@wipco/sdui 0.50.1 → 0.50.2

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/dist/index.js +9 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2845,6 +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(false);
2848
2849
  const [toasts, setToasts] = useState([]);
2849
2850
  const toastSeq = useRef(0);
2850
2851
  const toastTimers = useRef([]);
@@ -2879,10 +2880,17 @@ function SduiRenderer({
2879
2880
  }
2880
2881
  }
2881
2882
  }
2882
- if (Object.keys(seeded).length > 0) setEntries(seeded);
2883
+ if (Object.keys(seeded).length > 0) {
2884
+ urlSeedPending.current = true;
2885
+ setEntries(seeded);
2886
+ }
2883
2887
  }, [page.urlState, setEntries, syncUrlState]);
2884
2888
  useEffect(() => {
2885
2889
  if (!syncUrlState || !page.urlState?.length || !urlSeeded.current || typeof window === "undefined") return;
2890
+ if (urlSeedPending.current) {
2891
+ urlSeedPending.current = false;
2892
+ return;
2893
+ }
2886
2894
  const params = new URLSearchParams(window.location.search);
2887
2895
  let changed = false;
2888
2896
  for (const key of page.urlState) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipco/sdui",
3
- "version": "0.50.1",
3
+ "version": "0.50.2",
4
4
  "description": "WIPCO 서버 주도 UI(SDUI) 렌더러 — JSON 페이지 스펙을 React 컴포넌트로 렌더링",
5
5
  "keywords": [
6
6
  "sdui",