cogsbox-state 0.5.408 → 0.5.409
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 +218 -221
- package/dist/CogsState.jsx.map +1 -1
- package/package.json +1 -1
- package/src/CogsState.tsx +8 -15
package/package.json
CHANGED
package/src/CogsState.tsx
CHANGED
|
@@ -1930,22 +1930,15 @@ function createProxyHandler<T>(
|
|
|
1930
1930
|
if (isAtBottom || attempts >= maxAttempts) {
|
|
1931
1931
|
clearInterval(scrollToBottomIntervalRef.current!);
|
|
1932
1932
|
scrollToBottomIntervalRef.current = null;
|
|
1933
|
-
|
|
1934
|
-
// Do one final scroll to ensure we're truly at bottom
|
|
1935
|
-
if (
|
|
1936
|
-
isAtBottom &&
|
|
1937
|
-
container.scrollTop <
|
|
1938
|
-
container.scrollHeight - container.clientHeight
|
|
1939
|
-
) {
|
|
1940
|
-
container.scrollTop = container.scrollHeight;
|
|
1941
|
-
}
|
|
1942
1933
|
} else {
|
|
1943
|
-
//
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1934
|
+
// Set flag before scrolling
|
|
1935
|
+
isProgrammaticScrollRef.current = true;
|
|
1936
|
+
container.scrollTop = container.scrollHeight;
|
|
1937
|
+
|
|
1938
|
+
// Reset flag after a short delay
|
|
1939
|
+
setTimeout(() => {
|
|
1940
|
+
isProgrammaticScrollRef.current = false;
|
|
1941
|
+
}, 50);
|
|
1949
1942
|
}
|
|
1950
1943
|
}, 100);
|
|
1951
1944
|
|