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

Would like a way to disable the checkbox for specific nodes

Open zgr024 opened this issue 8 months ago • 0 comments

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 },
      ],
    },
  ],
};

zgr024 avatar Jun 18 '24 00:06 zgr024