liquor-tree
liquor-tree copied to clipboard
Refresh data collapse all nodes
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
+1, i'm also having this issue when using Vuex and the state is changed. All nodes collapse.
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.
I found a solution to this, hope it helps:
Simply, use the events
node:expanded
andnode:collapsed
to set the node or the VueX store node usingnode['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