TanStack / table

🤖 Headless UI for building powerful tables & datagrids for TS/JS - React-Table, Vue-Table, Solid-Table, Svelte-Table
https://tanstack.com/table
MIT License
24.51k stars 3.03k forks source link

Maximum update depth exceeded when hide virtualize table #5537

Open XDean opened 2 months ago

XDean commented 2 months ago

TanStack Table version

v8.16.0

Framework/Library version

v18.3.0

Describe the bug and the steps to reproduce it

Please see the codesandbox, it was forked from offical example dynamic virtualized rows

Just click the hide button, then React maximum update depth execeeded will happen.

The only code change is the BugApp component, it wrap the origin App and provde a button to toggle style to display: none.

This issue can't reproduce when only use @tanstack/virtualize, see this codesandbox. This is also forked from offical example.

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://codesandbox.io/p/devbox/nice-shannon-spvxpx

Screenshots or Videos (Optional)

image

Do you intend to try to help solve this bug with your own PR?

No, because I do not know how

Terms & Code of Conduct