You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to load child node when the parent node is clicked, because the size of tree is very large.
In the code below, I add a new child node "c" when clicking node "a", who has already a node named "b" and "b" has children as well.
When a is opened is selected, the open icon of "b" is disappared.
I'm working on Jupyter and chrome, ipytree version 0.2.1
from ipytree import Tree, Node
t = Tree(Stripes = True, multiple_selection=False)
a = Node("a")
t.add_node(a)
b = Node("b", [Node("f"), Node("g")])
b.opened = False
a.add_node(b)
def on_click_temp(event):
if(event.name=="selected"):
if (event["new"] == False) and (event["old"] == True):
return
event["owner"].add_node(Node("c", [Node("d"), Node("e")]))
a.observe(on_click_temp, names=["selected"] )
t
The text was updated successfully, but these errors were encountered:
Hello,
I would like to load child node when the parent node is clicked, because the size of tree is very large.
In the code below, I add a new child node "c" when clicking node "a", who has already a node named "b" and "b" has children as well.
When a is opened is selected, the open icon of "b" is disappared.
I'm working on Jupyter and chrome, ipytree version 0.2.1
The text was updated successfully, but these errors were encountered: