Skip to content

Commit 1dd31d5

Browse files
committed
remove outdated comment
1 parent 4128c6d commit 1dd31d5

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/providers/ScrollModeVirtualProvider.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ export function ScrollModeVirtualProvider({ children, canvasHeight, headerHeight
3939
throw new Error(`Invalid virtualCanvasHeight: ${virtualCanvasHeight} when clientHeight is ${clientHeight}. virtualCanvasHeight should be greater than clientHeight for virtual scrolling.`)
4040
}
4141

42-
// TODO(SL): onViewportChange should be stable. Or use setClientHeight and setScrollTop directly? Still interleaved states...
43-
// Currently, it breaks with "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops"
4442
const onViewportChange = useCallback(({ clientHeight, scrollTop }: { clientHeight: number, scrollTop: number }) => {
4543
// TODO(SL): remove this fallback (100px)? It's only for the tests in Node.js, where the elements have zero height
4644
// instead, it should return without updating the visible rows range, or set it to undefined.

0 commit comments

Comments
 (0)