react-checkbox-tree icon indicating copy to clipboard operation
react-checkbox-tree copied to clipboard

[Feature Request] onCheck/onClick/onExpand returns object w/ same data provided at invocation

Open MaxwellKendall opened this issue 5 years ago • 1 comments

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.

MaxwellKendall avatar Mar 31 '20 18:03 MaxwellKendall

@jakezatecky Can we get a review on this?

MaxwellKendall avatar Apr 27 '20 20:04 MaxwellKendall