fix: display admin and inactive when view

This commit is contained in:
jialin
2025-11-12 16:11:17 +08:00
parent 653ada5f0f
commit 2045bfaf78
7 changed files with 63 additions and 24 deletions
+10
View File
@@ -241,6 +241,15 @@ export default function useOverlayScroller(data?: {
};
};
const getScrollElement = () => {
if (!instanceRef.current || !scrollEventElement.current) {
instanceRef.current = instance?.();
scrollEventElement.current =
instanceRef.current?.elements()?.scrollEventElement;
}
return scrollEventElement;
};
useEffect(() => {
return () => {
instanceRef.current?.destroy?.();
@@ -254,6 +263,7 @@ export default function useOverlayScroller(data?: {
scrollEventElement: scrollEventElement,
initialized: initialized.current,
getScrollElementScrollableHeight,
getScrollElement,
generateInstance,
destroyInstance: destroyInstance,
updateScrollerPosition: throttledUpdateScrollerPosition,