redux-devtools icon indicating copy to clipboard operation
redux-devtools copied to clipboard

react-json-tree: Is it possible to add a checkbox on the left of each node?

Open walcivar opened this issue 3 years ago • 2 comments

Hi

I would like to know if is it possible to add a checkbox on the left of each node because I need to select some nodes. If it's possible how I can do that?

Thank you

walcivar avatar Jun 17 '22 06:06 walcivar

@walcivar The JSONTree class exports an optional property for a labelRenderer function that takes the following properties:

  • keyPath: (string|number)[]
  • nodeType: string,
  • expanded: boolean,
  • expandable: boolean

I solved that issue by creating a custom Label component that included a check box and function property for onSelect that returned the keyPath and the state of the checkbox.

UtahGooner avatar Jun 28 '22 18:06 UtahGooner

I am facing difficulty to select checkbox with parent child hierarchy i

sourabhpatole avatar Sep 26 '23 07:09 sourabhpatole