Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fancytree update tree with new data

Tags:

fancytree

I've been trying to use reload() to update the tree to new data but the whole tree reloads which is not wanted. Just want that the nodes get updated with the new data which will contain child data for the nodes. I do not want to reload the whole tree insted i want to keep the current nodes that I've expanded.

New to fancytree, any help is appreciated.


1 Answers

This worked for me:

 var rootNode = $(el).fancytree("getRootNode");
 rootNode.removeChildren();
 rootNode.addChildren(newTreeData);
like image 141
joshua Avatar answered Sep 17 '25 21:09

joshua