aprog 1.5.4 → 1.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/paginate.js +7 -13
package/package.json
CHANGED
package/src/paginate.js
CHANGED
|
@@ -9,6 +9,7 @@ export const paginate = ({ count = 0, currentPage = 1, onPageChange = () => {},
|
|
|
9
9
|
borderRadius: "0.5rem",
|
|
10
10
|
fontSize: "16px",
|
|
11
11
|
borderWidth: "0.0313rem",
|
|
12
|
+
border: "border: ${theme.borderWidth} solid ${theme.defaultColor};"
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
const theme = { ...defaultColors, ...colors };
|
|
@@ -33,7 +34,7 @@ export const paginate = ({ count = 0, currentPage = 1, onPageChange = () => {},
|
|
|
33
34
|
font-weight: 600;
|
|
34
35
|
color: ${theme.defaultColor};
|
|
35
36
|
background: ${theme.backgroundColor};
|
|
36
|
-
|
|
37
|
+
${theme.border}
|
|
37
38
|
border-radius: ${theme.borderRadius};
|
|
38
39
|
cursor: pointer;
|
|
39
40
|
box-shadow: ${theme.boxShadow};
|
|
@@ -116,18 +117,11 @@ export const paginate = ({ count = 0, currentPage = 1, onPageChange = () => {},
|
|
|
116
117
|
value: "...",
|
|
117
118
|
});
|
|
118
119
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
// ? `&filter=${_get("filter")}`
|
|
125
|
-
// : ""
|
|
126
|
-
// }${!isEmpty(_get("sort", null))
|
|
127
|
-
// ? `&sort=${_get('sort')}`
|
|
128
|
-
// : ""
|
|
129
|
-
// }`
|
|
130
|
-
// );
|
|
120
|
+
const navigateTo = (path) => {
|
|
121
|
+
window.history.pushState("", "", path);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
navigateTo(`${window.location.pathname}?page=${currentPage || 1}`);
|
|
131
125
|
|
|
132
126
|
return div({
|
|
133
127
|
class: "paginate-block",
|