react-vtree
react-vtree copied to clipboard
The expanded children nodes are expanded even when we collapsed at the parent level.
Hi, I encountered one scenario -
-
Let's say we have four nested nodes. Expand the nodes one by one till the last nested children.
-
Now, collapse at the most top-level parent, it would get collapse. But when expanded again, all nested nodes were found in the same open state.
Once collapsed at the parent level, all the sub-nodes should also collapse every time.
isOpenByDefault: false/true didn't help on this as it just helps to maintain an initial state of all nodes (whether to keep all nodes as in expanded or collapse state)
Each node has its own state. In order to collapse everything under a node you need to use recomputeTree which is accessible when using a ref.