Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
aqib1992 opened this issue Apr 22, 2019 · 4 comments
Open

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

aqib1992 opened this issue Apr 22, 2019 · 4 comments

Comments

@aqib1992
Copy link

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

@jakezatecky
Copy link
Owner

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.

@aqib1992
Copy link
Author

aqib1992 commented Apr 23, 2019

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.

@jakezatecky
Copy link
Owner

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.

@aqib1992
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants