Closed johaven closed 7 years ago
Can you please share a fiddle with the issue?
Finally, It's happen when i have 2 path open in a same root folder and i refresh or reload tree.
To test: expand two nodes of the same root folder and refresh with $('#tree').jstree(true).refresh() - many times if possible.
This is confirmed by the developer of jstree, it comes right jstree Directive. it is not related to the state plugin. With the last version of Jstree in master branch, i got this error:
TypeError: f.id.replace is not a function ...str(1).replace(a.jstree.idregex,"\$&"):f.id.replace(a.jstree.idregex,"\$&"))):...
How to reproduce:
Oh! ok. Any proposed fix for this issue?
Not yet had time to dissect the code, but it should be easy for you I think? Do you have a proposal to refresh the tree in another way?
As of now, I do not have a solution for this. May be you could save last opened children nodes in local storage and open the tree nodes till this level recursively? I don't know, may not be the correct way to do it.
Do let me know if you find a fix for this. Thanks!
If multiple trees are loaded and one of them will have the state parameter. Errors between the trees occur when traverses the same folders.
TypeError: a.state is undefined ...d:function(a){return a=this.get_node(a),a&&a.state.loaded},is_loading:function(a...
or
TypeError: this._model.data[b].state is undefined ...model.data.hasOwnProperty(b)&&"#"!==b&&(this._model.data[b].state.opened&&a.core...