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

outside checkbox to check all the nodes to of checkbox tree.

Open aqib1992 opened this issue 6 years ago • 4 comments

I want to check all the checkbox with outside checkbox. It is possible now ?? If not will you consider doing that ??

aqib1992 avatar Apr 22 '19 13:04 aqib1992

There currently does not exist an option for a checkbox outside of the main tree to toggle all nodes. The best way to allow a user to check/uncheck all nodes would be to have a single root-level node and add its value to the expanded array. That would essentially accomplish the purpose of checking all nodes but it would be within the tree.

I have considered adding a check all/uncheck all option like there is expand all/collapse, but decided against it due to the above solution.

jakezatecky avatar Apr 23 '19 01:04 jakezatecky

Yeah i do understand that but my structure is different. I have Multiple tabs each tab contains react checkbox tree. and i refer that tab to whole tree.

Screenshot from 2019-04-23 10-34-01

Plz refer the attach file to see my structure. and ignore what is written on it.

aqib1992 avatar Apr 23 '19 05:04 aqib1992

I would not be opposed to adding checkAllNodes and uncheckAllNodes methods to the tree instance that you could invoke using a React ref. However, you would have to create whatever element in the interface to expose this action to the user.

jakezatecky avatar Apr 24 '19 00:04 jakezatecky

i am trying to add new function to the library. But below Error Occurs: Error: Cannot find module './test/setup.js'.

aqib1992 avatar May 13 '19 11:05 aqib1992