From 13c3736b4280ccffc283ad939079af5ff139dfba Mon Sep 17 00:00:00 2001 From: melloware Date: Tue, 7 Jan 2025 08:17:57 -0500 Subject: [PATCH] Fix #7574: VirtualScroller not displaying in ListBox --- components/lib/virtualscroller/VirtualScroller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lib/virtualscroller/VirtualScroller.js b/components/lib/virtualscroller/VirtualScroller.js index 740c3d96a5..5a227d9426 100644 --- a/components/lib/virtualscroller/VirtualScroller.js +++ b/components/lib/virtualscroller/VirtualScroller.js @@ -541,7 +541,7 @@ export const VirtualScroller = React.memo( }; const init = () => { - if (!props.disabled && isVisible(elementRef.current)) { + if (!props.disabled && DomHandler.isVisible(elementRef.current)) { setSize(); calculateOptions(); setSpacerSize(); @@ -559,7 +559,7 @@ export const VirtualScroller = React.memo( }; React.useEffect(() => { - if (!viewInitialized.current && isVisible(elementRef.current)) { + if (!viewInitialized.current && isVisible()) { viewInit(); viewInitialized.current = true; }