react-checkbox-tree
react-checkbox-tree copied to clipboard
[Feature Request] onCheck/onClick/onExpand returns object w/ same data provided at invocation
It would be really nice if we could do the following:
onCheck = (newChecked, selectedNode) => {
const { requiredKey } = selectedNode;
const { myCustomKey } = selectedNode.extraKeys;
// do something with myCustomKey
}
<CheckboxTree nodes=[{ ...allRequiredKeys, ...myCustomKeys }] onCheck={this.onCheck}/>
At the moment, only the required keys are returned and therefore myCustomKey above is undefined.
@jakezatecky Can we get a review on this?