Closed deflexor closed 8 years ago
Could set up a sample, jsFiddle, or plunkr that reproduces this?
Is it possible to emulate json backend for dynatree with jsFiddle ? I tried (http://jsfiddle.net/xj5au/165/), but with no luck.
Here is working Plunkr: https://plnkr.co/edit/XDmdwox345o1Azb1E1y9?p=preview
Does it work for you if you set 'persist: false'?
Not quite, for example one wants to close "Folder 2", press "Reload tree" button, and after tree reload wants to see "Folder 2" closed and other folders open. With 'persist: false' this is not the case.
You could try to pass explicit keys in the json data, to make persistance work
Thank you, I updated plunkr code and "Folder 2" now stays expanded, but other nodes still doesn't respect expand: true
(I did not see any changes in the Plunkr, but anyway:)
This means, that if persistence is on, it controls the expansion state: All nodes that have their key stored in the cookie are expanded. All others are collapsed.
The json status is ignored in this case.
Is it possible to somehow change this bahaviour ? The fix should be easy as it goes.
It's not a bug. If persistence is on and cookies have been set, this determines the status. Otherwise, json determines the status.
Dynatree is feature frozen since 2014, so I don't plan to add improvements. Maybe you want to have a look at fancytree, which might be easier to customize.
I have tree that gets data via ajax json. When i call
tree.reload()
and new children come from server, they always collapsed, not only they but also parent nodes in which they appeared. Any help how to change this behaviour ? I triedautoCollapse
option and also tried addingexpand: true
to json data, but without effect. I use latest version of dynatree: 1.2.8