Hide Nodes based on custom data attributes

84 views
Skip to first unread message

sinthetic motion

unread,
Jul 19, 2018, 5:12:18 AM7/19/18
to Fancytree Q&A
Hi

Is it possible to hide Nodes based on certain Attributes e.g. node.data.attr="1" > show node.data.attr="0" > hide ... i know there are filters and i already use them but for node data i don't know how to handle it properly!

thanks for the great product!

best, andy

sinthetic motion

unread,
Jul 19, 2018, 5:35:33 AM7/19/18
to Fancytree Q&A
found it in the ext_filter documentation:

$
("#tree").fancytree("getTree").filterNodes(function(node) { return node.data.customFlag === true; });
Reply all
Reply to author
Forward
0 new messages