-
Notifications
You must be signed in to change notification settings - Fork 17
Description
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.