beyond-rails 0.0.285 → 0.0.286
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/src/js/components/Pagination.js +12 -0
- data/src/sass/components/_pagination.scss +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ec3e181da10e04daca80c0dfa0429d270b01c321688f86fc7a2b4d329d56c51
|
4
|
+
data.tar.gz: 8e3e668db1593b11e606335a70bbfbfa328b4e91539ac796355936c5f480bfe5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2105d76b9738d20809c5771e9ceed7526d7fb1c39e237e3301340a82de4607aa6277728ea3072e4b89d08a85cdb6172351c52ed3c6eafab579e03329b437fcc1
|
7
|
+
data.tar.gz: 9268795c6484a78e794a072a19ba382358204da091a43e549743794cfa128f72a9414d938cdb48969d31c71212f173cb69eab4baf757bd327245b50a8b0a0df5
|
@@ -81,8 +81,18 @@ export default class Pagination {
|
|
81
81
|
this.ul.insertBefore(li, this.nextBtn.parentNode)
|
82
82
|
}
|
83
83
|
|
84
|
+
hideInput() {
|
85
|
+
this.input.parentNode.style.display = 'none'
|
86
|
+
}
|
87
|
+
|
88
|
+
showInput() {
|
89
|
+
this.input.parentNode.style.display = 'flex'
|
90
|
+
}
|
91
|
+
|
84
92
|
drawRegularPages(currentPage = this.page) {
|
85
93
|
|
94
|
+
this.hideInput()
|
95
|
+
|
86
96
|
range(1, this.total + 1)
|
87
97
|
.forEach(page => {
|
88
98
|
const li = this.getLiNode(page)
|
@@ -95,6 +105,8 @@ export default class Pagination {
|
|
95
105
|
|
96
106
|
this.clearPages()
|
97
107
|
|
108
|
+
this.showInput()
|
109
|
+
|
98
110
|
const { total } = this
|
99
111
|
const beforeLast = total - 1
|
100
112
|
|