cogsbox-state 0.5.327 → 0.5.329
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/CogsState.jsx +448 -450
- package/dist/CogsState.jsx.map +1 -1
- package/package.json +1 -1
- package/src/CogsState.tsx +2 -3
package/package.json
CHANGED
package/src/CogsState.tsx
CHANGED
|
@@ -1819,6 +1819,8 @@ function createProxyHandler<T>(
|
|
|
1819
1819
|
|
|
1820
1820
|
// This state triggers a re-render when item heights change.
|
|
1821
1821
|
const [shadowUpdateTrigger, setShadowUpdateTrigger] = useState(0);
|
|
1822
|
+
const hasInitiallyLoadedRef = useRef(false);
|
|
1823
|
+
const prevTotalCountRef = useRef(0);
|
|
1822
1824
|
|
|
1823
1825
|
useEffect(() => {
|
|
1824
1826
|
const unsubscribe = getGlobalStore
|
|
@@ -1939,9 +1941,6 @@ function createProxyHandler<T>(
|
|
|
1939
1941
|
passive: true,
|
|
1940
1942
|
});
|
|
1941
1943
|
|
|
1942
|
-
const hasInitiallyLoadedRef = useRef(false);
|
|
1943
|
-
const prevTotalCountRef = useRef(0);
|
|
1944
|
-
|
|
1945
1944
|
// In your useLayoutEffect:
|
|
1946
1945
|
if (stickToBottom) {
|
|
1947
1946
|
// Check if this is initial load or new item
|