10

Iv been working on a project with fancytree as a tree-view. works grate with Ajax and server calls. How ever. I still wonder if its possible to reload a selected node to get updated regarding its children? Iv seen and tried theReload() function. But it seems it only reloads the either tree-structure and that would not be necessary.

Otherwise, do you know of any other tree-view that supports this kind of node-reload?

Jonas Lindahl
  • 752
  • 10
  • 24

1 Answers1

13

There is also node.load(forceReload=false) and node.resetLazy().

See here for an overview: http://www.wwwendt.de/tech/fancytree/doc/jsdoc/FancytreeNode.html

mar10
  • 14,320
  • 5
  • 39
  • 64
  • Works grate. Is there a way to even improve this like a recursive node update? Would be grate of it would be possible to keep the tree in "almost" the state its in and only update changes like renames, deletes and adds? This to avoid expanded sub-nodes to be closed agin. – Jonas Lindahl Mar 20 '14 at 21:40
  • 1
    We have `tree.applyPatch()`, but that's not fully imple,ented yet. The recommended way is currently to reload the tree and use the persist extension – mar10 Mar 21 '14 at 07:28
  • Is there an example: how to use? – Sarah Trees Aug 13 '23 at 11:41