@charlesgomes/leafcode-shared-lib-react 1.0.49 → 1.0.50
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 +10 -0
- package/dist/index.mjs +11 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -863,6 +863,16 @@ function DataTableAdvancedFilterWrapper({
|
|
|
863
863
|
globalFilterFields
|
|
864
864
|
)
|
|
865
865
|
});
|
|
866
|
+
const didInitRef = (0, import_react6.useRef)(false);
|
|
867
|
+
(0, import_react6.useEffect)(() => {
|
|
868
|
+
if (didInitRef.current) return;
|
|
869
|
+
didInitRef.current = true;
|
|
870
|
+
window.history.replaceState(
|
|
871
|
+
null,
|
|
872
|
+
"",
|
|
873
|
+
window.location.href
|
|
874
|
+
);
|
|
875
|
+
}, []);
|
|
866
876
|
const updateUrlParams = (params, options = { replace: true }) => {
|
|
867
877
|
if (typeof window === "undefined" || !replaceUrl) return;
|
|
868
878
|
const urlParams = new URLSearchParams(window.location.search);
|
package/dist/index.mjs
CHANGED
|
@@ -129,7 +129,7 @@ function ModalBase({
|
|
|
129
129
|
import { useEffect as useEffect4, useState as useState3 } from "react";
|
|
130
130
|
|
|
131
131
|
// src/components/DataTableAdvancedFilter/DataTableAdvancedFilterWrapper.tsx
|
|
132
|
-
import { useEffect as useEffect3, useMemo, useState as useState2 } from "react";
|
|
132
|
+
import { useEffect as useEffect3, useMemo, useRef, useState as useState2 } from "react";
|
|
133
133
|
import { useQuery } from "@tanstack/react-query";
|
|
134
134
|
|
|
135
135
|
// src/primereact-compat.ts
|
|
@@ -808,6 +808,16 @@ function DataTableAdvancedFilterWrapper({
|
|
|
808
808
|
globalFilterFields
|
|
809
809
|
)
|
|
810
810
|
});
|
|
811
|
+
const didInitRef = useRef(false);
|
|
812
|
+
useEffect3(() => {
|
|
813
|
+
if (didInitRef.current) return;
|
|
814
|
+
didInitRef.current = true;
|
|
815
|
+
window.history.replaceState(
|
|
816
|
+
null,
|
|
817
|
+
"",
|
|
818
|
+
window.location.href
|
|
819
|
+
);
|
|
820
|
+
}, []);
|
|
811
821
|
const updateUrlParams = (params, options = { replace: true }) => {
|
|
812
822
|
if (typeof window === "undefined" || !replaceUrl) return;
|
|
813
823
|
const urlParams = new URLSearchParams(window.location.search);
|