react-folder-tree
react-folder-tree copied to clipboard
Would like a way to disable the checkbox for specific nodes
const treeState = {
name: 'root [half checked and opened]',
checked: 0.5, // half check: some children are checked
isOpen: true, // this folder is opened, we can see it's children
children: [
{ name: 'children 1 [not checked]', checked: 0 },
{
name: 'children 2 [half checked and not opened]',
checked: 0.5,
isOpen: false,
isDisabled: true, // <--- add this optional property to disable the checkbox
children: [
{ name: 'children 2-1 [not checked]', checked: 0, isDisabled: true },
{ name: 'children 2-2 [checked]', checked: 1 },
],
},
],
};