react-arborist
react-arborist copied to clipboard
Deselect not firing event
trafficstars
On lines 341 to 345, there is a missing call to fire the tree.onSelect callback. This is preventing me from getting an updated list of selected nodes on deselection. I am using checkboxes for my implementation.
deselect(node: Identity) {
if (!node) return;
const id = identify(node);
this.dispatch(selection.remove(id));
}
This needs to be:
deselect(node: Identity) {
if (!node) return;
const id = identify(node);
this.dispatch(selection.remove(id));
safeRun(this.props.onSelect, this.selectedNodes);
}