jakezatecky / react-checkbox-tree

A simple and elegant checkbox tree for React.

Home Page:https://jakezatecky.github.io/react-checkbox-tree/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disabled node option needed to pass in separate array same as checked array

rdebraj2021 opened this issue · comments

Please include a clear and concise description of the feature or enhancement you would like to have added to the project.

Need to disable some node values , currently for disable a node we need to pass "disabled"(disabled: true) with node label & value.

We need multiple nodes disabled, so its better if a separate array to disable nodes same as checked and expanded array.

Expected checked,expanded & disabled array :

/* sample checked,expanded & disabled array */

state = {
checked: [
"/app/Http/Controllers/WelcomeController.js",
"/app/Http/routes.js",
"/public/assets/style.css",
"/public/index.html",
"/.gitignore"
],
expanded: ["/app", "/app/Http"],
disabled: ["/README.md", "/.gitignore", "/app/Http/routes.js"]
};

Please check the code sample-
https://codesandbox.io/s/react-checkbox-tree-example-forked-b9ugv?file=/src/components/Widget.js

I have exactly the same need. can't wait to see this added feature. Great lib, thank you