TanStack Table version#
9.0.0-beta.55
Framework/Library version#
React v19.2.6
Describe the bug and the steps to reproduce it#
Using the official Expanding example and switching to controlled expanded state, I am receiving an error saying: Cannot update a component (App) while rendering a different component (App).
To switch to the controlled state, these steps were made:
const [expanded, setExpanded] = useState<ExpandedState>({}) added to the App.
state: { expanded } uncommented.
onExpandedChange: setExpanded uncommented.
Here is the link to the sandbox.
Steps to reproduce the error:
- try to expand any of rows. The error is seen in the console then.
Am I doing it wrong?
Thanks in advance.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)#
https://codesandbox.io/p/devbox/lingering-water-s9qsyv
Screenshots or Videos (Optional)#
No response
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#
UPDATE: this error occurs in all examples, where the controlled state is used. For example this and that.