@wipco/sdui 0.50.2 → 0.50.3
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 +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2845,7 +2845,7 @@ function SduiRenderer({
|
|
|
2845
2845
|
hostRef.current = host;
|
|
2846
2846
|
const [state, setState] = useState(() => ({ ...initialState ?? {} }));
|
|
2847
2847
|
const urlSeeded = useRef(false);
|
|
2848
|
-
const urlSeedPending = useRef(
|
|
2848
|
+
const urlSeedPending = useRef(null);
|
|
2849
2849
|
const [toasts, setToasts] = useState([]);
|
|
2850
2850
|
const toastSeq = useRef(0);
|
|
2851
2851
|
const toastTimers = useRef([]);
|
|
@@ -2881,15 +2881,15 @@ function SduiRenderer({
|
|
|
2881
2881
|
}
|
|
2882
2882
|
}
|
|
2883
2883
|
if (Object.keys(seeded).length > 0) {
|
|
2884
|
-
urlSeedPending.current =
|
|
2884
|
+
urlSeedPending.current = seeded;
|
|
2885
2885
|
setEntries(seeded);
|
|
2886
2886
|
}
|
|
2887
2887
|
}, [page.urlState, setEntries, syncUrlState]);
|
|
2888
2888
|
useEffect(() => {
|
|
2889
2889
|
if (!syncUrlState || !page.urlState?.length || !urlSeeded.current || typeof window === "undefined") return;
|
|
2890
2890
|
if (urlSeedPending.current) {
|
|
2891
|
-
urlSeedPending.current
|
|
2892
|
-
|
|
2891
|
+
if (!Object.keys(urlSeedPending.current).every((key) => Object.hasOwn(state, key))) return;
|
|
2892
|
+
urlSeedPending.current = null;
|
|
2893
2893
|
}
|
|
2894
2894
|
const params = new URLSearchParams(window.location.search);
|
|
2895
2895
|
let changed = false;
|