Is it possible to create a fancytree from a subset of nodes that exist in another fancytree?
In essence what I want to accomplish is that a user clicks on a node in a tree, use the key of the node to get its structure (with all of its children) and then pass that into the source of a new tree.
So something like this:
var tree = $.ui.fancytree.getTree("#exampleTree");
var node = tree.getNodeByKey(key);
$("#newTree").fancytree({
selectMode: 1,
source: {node}
});
Any help would be greatly appreciated.
This should be doable using a combination of
subNodes = node.toDict(true)
andtree.reload(subNodes)
.See also the API docs.