Skip to content

treeNodeSelectedChange API improvement? #298

@luckyrat

Description

@luckyrat

Is your feature request related to a problem? Please describe.
I'd like to track when the selected node is changed. Although the current API helps somewhat, it doesn't allow me to differentiate between a new node being selected and all nodes being unselected by the user.

It appears that sometimes/always the "unselected" node is sent to the treeNodeSelectedChange callback before the newly selected node.

Describe the solution you'd like
Either reliably send all deselection callbacks before selection ones, or change the API so that it has two optional parameters (oldNode, newNode). Ideally that would be sent just once for a selection change in single mode.

For single-selection mode, this change would mean that a single variable in my parent component could track the selection status, whereas with the current API, I would have to duplicate the entire tree and track the selection status of each node, allowing for the brief period in which more than one node can be selected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions