Skip to content

Commit

Permalink
Refactor #7516
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Dec 20, 2024
1 parent 9e5670a commit 88e8d27
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/lib/virtualscroller/VirtualScroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,9 +549,13 @@ export const VirtualScroller = React.memo(
};

const isVisible = () => {
const rect = elementRef.current.getBoundingClientRect();
if (DomHandler.isVisible(elementRef.current)) {
const rect = elementRef.current.getBoundingClientRect();

return rect.width > 0 && rect.height > 0;
return rect.width > 0 && rect.height > 0;
}

return false;
};

React.useEffect(() => {
Expand Down

0 comments on commit 88e8d27

Please sign in to comment.