@charlesgomes/leafcode-shared-lib-react 1.0.47 → 1.0.48

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/dist/index.js CHANGED
@@ -863,7 +863,7 @@ function DataTableAdvancedFilterWrapper({
863
863
  globalFilterFields
864
864
  )
865
865
  });
866
- const updateUrlParams = (params) => {
866
+ const updateUrlParams = (params, options = { replace: true }) => {
867
867
  if (typeof window === "undefined" || !replaceUrl) return;
868
868
  const urlParams = new URLSearchParams(window.location.search);
869
869
  Object.entries(params).forEach(([key, value]) => {
@@ -876,11 +876,8 @@ function DataTableAdvancedFilterWrapper({
876
876
  );
877
877
  }
878
878
  });
879
- window.history.replaceState(
880
- null,
881
- "",
882
- `${window.location.pathname}?${urlParams.toString()}`
883
- );
879
+ const newUrl = `${window.location.pathname}?${urlParams.toString()}`;
880
+ window.history.pushState(null, "", newUrl);
884
881
  };
885
882
  const onPage = (event) => {
886
883
  setFirst(event.first);
package/dist/index.mjs CHANGED
@@ -808,7 +808,7 @@ function DataTableAdvancedFilterWrapper({
808
808
  globalFilterFields
809
809
  )
810
810
  });
811
- const updateUrlParams = (params) => {
811
+ const updateUrlParams = (params, options = { replace: true }) => {
812
812
  if (typeof window === "undefined" || !replaceUrl) return;
813
813
  const urlParams = new URLSearchParams(window.location.search);
814
814
  Object.entries(params).forEach(([key, value]) => {
@@ -821,11 +821,8 @@ function DataTableAdvancedFilterWrapper({
821
821
  );
822
822
  }
823
823
  });
824
- window.history.replaceState(
825
- null,
826
- "",
827
- `${window.location.pathname}?${urlParams.toString()}`
828
- );
824
+ const newUrl = `${window.location.pathname}?${urlParams.toString()}`;
825
+ window.history.pushState(null, "", newUrl);
829
826
  };
830
827
  const onPage = (event) => {
831
828
  setFirst(event.first);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@charlesgomes/leafcode-shared-lib-react",
3
- "version": "1.0.47",
3
+ "version": "1.0.48",
4
4
  "description": "Lib de componentes react",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",