Sherlock
Sherlock

Reputation: 13

Fancytree render all elements

https://github.com/mar10/fancytree

Basically this tree adds and removes child elements on expand / collapse. I cannot modify DOM elements for the children unless the tree is expanded.

I've searched the documentation for a solution an haven't found one. Maybe some of you had this problem...

I want the DOM elements created for all nodes in the tree at the start (hidden if not expanded, but existent).

Thanks

Upvotes: 1

Views: 1642

Answers (1)

mar10
mar10

Reputation: 14834

You could use the method 'Fancytree.render(force=false, deep=false)' to create DOM elements for hidden nodes, e.g.

tree.render(true, true)

This is not efficient though. Implementing the 'render...' callbacks may be a better approach, depending on the use case.

Upvotes: 3

Related Questions