I use this documentation for save and restore treetable state:
https://docs.webix.com/desktop__datastate_state.html
In my situation it doesn't work , maybe because I reload treetable from server ?
1) I load treetable from server (nodes closed)
2) I open parent nodes buy clicks
3) I save the treetable state
4) I reload treetable from server (node closed)
5) I restore treetable last state
When I look in firebug, the treetable data saved with open nodes in local storage are ok but the nodes are always closed in view
Comments
Hello @romain ,
To restore the state, use
ready
handler or call thesetState
after component initialization:Please check the next snippet:
https://snippet.webix.com/qa8mgzur
Thanks , but it doesn't work for me where data are reload from server.
I have a function that reload my tree when I make a modification.
The server doesn't know what nodes had opened in front.
This function save the state, clear the tree and reload data from server.
I tried to set the state saved (data saved are ok in local storage) with event "onAfterLoad" , but it doesn't work too, the nodes are always closed even if the state saved has : open: Array(3) [ "1", "2", "3" ]
Any ideas ?
Hi @romain,
Unfortunately, I wasn't able to reproduce this issue under the described scenario, e.g.: https://snippet.webix.com/ami48sag. If at all possible, could you please providean isolated example where the issue can be seen?
It is ok
After a lot of tests , I understood why for me it didn't work , it wasn't simple because my view contains a lot of interactions (6000 lines of code ..), I have a event "onAfterFilter" and in this event I used the method "closeAll" for nodes and when tree is reload , the event is triggered .. Thanks for example 
Hello , is it possible to restore just some properties for datatable ?
For example I don't want to restore "filter" object of my datatable.
Thanks