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

Question: How can i change what is passed in onCheck?

Open pedaars opened this issue 3 years ago • 1 comments

My nodes contain a count value that I would like to be able to access in the nodeinfo object of onCheck. is it possible to retrieve the full node in the node info instead of just the node value?

pedaars avatar May 05 '22 09:05 pedaars

You can access the affected node through the second argument of the onCheck function (onCheck(nodes, node)), but unfortunately this does not pass in any custom attributes that you may have assigned to a node. We would require a slight enhancement to this library to support this.

jakezatecky avatar May 06 '22 01:05 jakezatecky