I have a Treeview control which is populated from a Vuex store via a getter in a computed property. The problem is when the computed property is fired the treeview is refresh but all the nodes are collapsed. Ive tried using the enablePersistence property but it doesnt work. My code is below. any help is appreciated.
ABAshokkumar Balasubramanian Syncfusion Team August 19, 2019 03:42 AM
Hi Adam Moroff,
Good day to you.
We have validated your requirements and prepared a sample according to that. When the computed property is fired, the overall component will be re rendered. So, if you want to maintain the expanded state, you have to update the state of the corresponding node in the nodeExpanded event using the following code snippet.
Kindly check the above sample and let us know if you have any concerns.
YPYogesh PatilNovember 11, 2020 09:25 PM
Can I get the same solution in Angular 8.
SAShameer Ali Baig Sulaiman Ali Baig Syncfusion Team November 13, 2020 12:34 AM
In the following Angular TreeView’s documentation section, we have added sample for adding new nodes in the tree node. On adding the tree node, other already expanded tree nodes will stay in expanded state.