chore: create cluster ux

This commit is contained in:
jialin
2025-09-16 11:26:17 +08:00
parent 55b0a20a4a
commit 62dbd18ef8
26 changed files with 690 additions and 392 deletions
+5 -1
View File
@@ -55,5 +55,9 @@ export default function useBodyScroll() {
};
}, []);
return { saveScrollHeight, restoreScrollHeight };
return {
saveScrollHeight,
restoreScrollHeight,
bodyScroller: bodyScroller.current
};
}
+7
View File
@@ -199,6 +199,12 @@ export default function useOverlayScroller(data?: {
[initialize, instance]
);
const destroyInstance = () => {
instanceRef.current?.destroy?.();
removeWheelEvent();
instanceRef.current = null;
};
useEffect(() => {
return () => {
instanceRef.current?.destroy?.();
@@ -212,6 +218,7 @@ export default function useOverlayScroller(data?: {
scrollEventElement: scrollEventElement.current,
initialized: initialized.current,
generateInstance,
destroyInstance: destroyInstance,
updateScrollerPosition: throttledUpdateScrollerPosition,
updateScrollerPositionToTop: updateScrollerPositionToTop
};