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

Refresh data collapse all nodes #219

Open
kelu95 opened this issue Sep 7, 2020 · 3 comments
Open

Refresh data collapse all nodes #219

kelu95 opened this issue Sep 7, 2020 · 3 comments

Comments

@kelu95
Copy link

kelu95 commented Sep 7, 2020

Hi,

first, thank you for your work, very helpful!

I have a problem, when I refresh my tree data like this : this.$refs.tree.tree.setModel(newData);
The data is well refreshing but all the expanded nodes collapse and I can't find the solution.

Is there a workaround?

Regards

@Braedennz
Copy link

+1, i'm also having this issue when using Vuex and the state is changed. All nodes collapse.

@Braedennz
Copy link

Braedennz commented Oct 6, 2020

I found a solution to this, hope it helps:

Simply, use the events node:expanded and node:collapsed to set the node or the VueX store node using node['state'] = { expanded: Boolean}.

This way when the data refreshes, it'll use the most recent toggled state.

@apydevs
Copy link

apydevs commented Nov 3, 2020

I found a solution to this, hope it helps:

Simply, use the events node:expanded and node:collapsed to set the node or the VueX store node using node['state'] = { expanded: Boolean}.

This way when the data refreshes, it'll use the most recent toggled state.

@Braedennz hey, could you give an example of where you are applying the node.state with Vuex. I'm having the same issue

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

3 participants