Skip to content

Nodes selected programmatically do not de-select other nodes when multiple_selection=False #81

Open
@bheberlein

Description

@bheberlein

If I create a Tree instance like this

from ipytree import Tree, Node

tree = Tree(multiple_selection=False)

node1 = Node('First Node')
node2 = Node('Second Node')

tree.add_node(node1)
tree.add_node(node2)

then I am unable to select multiple nodes by control-clicking (command-clicking on Mac), which is consistent with my understanding of what the multiple_selection keyword argument is supposed to do.

However, if I select the nodes programmatically, I can select multiple nodes at once:

node1.selected = True
node2.selected = True

It seems like the tree should automatically deselect node1 when node2.selected is set to True.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions