I have a simple react-table with an expanded sub component whose data is tied to a Redux state object.
When the sub component gets expanded, I trigger an api call to get some additional data to be lazy-loaded onto the redux store. The redux store gets updated with the new data and the sub component DOM gets successfully updated as well, but the problem is the expanded row doesn't stay expanded after the re-render. It collapses.
Is there a way to keep my expanded rows expanded even after the redux store gets updated and a re-render is triggered?
Set autoResetExpanded
to false in configuration, more details - https://react-table.tanstack.com/docs/api/useExpanded
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With