Prohibit re-rendering of entire table on row expansion
TanStack Table version
8.11.2
Framework/Library version
next js 14
Describe the bug and the steps to reproduce it
i have a situation where i am rendering a subcomponent on row expansion. this works well and as expected. Unfortunately though the toggle expansion handler seems to render the entire table on a change. this causes a huge amount of unnecessary requests to the server.
I did find this post but it is fairly outdated: https://github.com/TanStack/table/discussions/2212. is it possible to stop the rendering using useMemo or something equivalent? the behavior im after is that i fetch the subcomponent on expansion, but only on expansion. ie if another row is expanded, the refetch should not occur again. if there was only a few rows it wouldnt be a problem, but when we have 10k etc this is an issue.
thanks for the help.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
the same issue appears in the tanstack table expanded rows or subcomponent example
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
None
Terms & Code of Conduct
- [X] I agree to follow this project's Code of Conduct
- [X] I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.