Skip to content

Commit

Permalink
fix: grid hooks
Browse files Browse the repository at this point in the history
Fixes #1131
  • Loading branch information
petyosi committed Sep 7, 2024
1 parent 1df9a68 commit 78aa3dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/VirtuosoGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,16 @@ const GridItems: React.FC = /*#__PURE__*/ React.memo(function GridItems() {
false
)

if (stateRestoreInProgress) {
return null
}

useIsomorphicLayoutEffect(() => {
if (gridState.itemHeight > 0 && gridState.itemWidth > 0) {
reportReadyState(true)
}
}, [gridState])

if (stateRestoreInProgress) {
return null
}

return (
<ListComponent
ref={listRef}
Expand Down

0 comments on commit 78aa3dd

Please sign in to comment.