liquor-tree icon indicating copy to clipboard operation
liquor-tree copied to clipboard

Refresh data collapse all nodes

Open kelu95 opened this issue 3 years ago • 3 comments

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

kelu95 avatar Sep 07 '20 20:09 kelu95

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

Braedennz avatar Oct 01 '20 23:10 Braedennz

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 avatar Oct 06 '20 21:10 Braedennz

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

apydevs avatar Nov 03 '20 13:11 apydevs