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

How can I specify if a node should be expanded or collapsed on load? #41

Open
alesce opened this issue Sep 17, 2018 · 1 comment
Open

Comments

@alesce
Copy link

alesce commented Sep 17, 2018

When I reload the tree data I would like to keep the same nodes expanded/collapsed if they still exist.

Currently I can't find any option to do so. Am I missing something?

Regard,
Aleš

@kinow
Copy link

kinow commented Jan 28, 2020

I had to do something similar. Each node you create in your data, has two important entries, the children and the state. The first tells the library what are the nodes under the current node. And the second is the state of the node. In the state, you can define state.open. When true, it will be expanded.

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