Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The expanded children nodes are expanded even when we collapsed at the parent level. #91

Open
PoojaMgr opened this issue Jul 6, 2022 · 1 comment

Comments

@PoojaMgr
Copy link

PoojaMgr commented Jul 6, 2022

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)

@gregjoeval
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants