aprog 1.5.3 → 1.5.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/paginate.js +6 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aprog",
3
- "version": "1.5.3",
3
+ "version": "1.5.5",
4
4
  "description": "Допоміжна бібліотека js",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/paginate.js CHANGED
@@ -16,7 +16,7 @@ export const paginate = ({ count = 0, currentPage = 1, onPageChange = () => {},
16
16
  const styles = `
17
17
  <style>
18
18
  .paginate-block {
19
- width: 100%;
19
+ width: 100vw;
20
20
  padding: 0 20px;
21
21
  margin: 20px 0;
22
22
  display: flex;
@@ -116,18 +116,11 @@ export const paginate = ({ count = 0, currentPage = 1, onPageChange = () => {},
116
116
  value: "...",
117
117
  });
118
118
 
119
- // const navigateTo = (path) => {
120
- // window.history.pushState("", "", path);
121
- // }
122
- //
123
- // navigateTo(`${window.location.pathname}?page=${currentPage || 1}${!isEmpty(_get("filter", null))
124
- // ? `&filter=${_get("filter")}`
125
- // : ""
126
- // }${!isEmpty(_get("sort", null))
127
- // ? `&sort=${_get('sort')}`
128
- // : ""
129
- // }`
130
- // );
119
+ const navigateTo = (path) => {
120
+ window.history.pushState("", "", path);
121
+ }
122
+
123
+ navigateTo(`${window.location.pathname}?page=${currentPage || 1}`);
131
124
 
132
125
  return div({
133
126
  class: "paginate-block",