Skip to content
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

Would like a way to disable the checkbox for specific nodes #107

Open
zgr024 opened this issue Jun 18, 2024 · 0 comments
Open

Would like a way to disable the checkbox for specific nodes #107

zgr024 opened this issue Jun 18, 2024 · 0 comments

Comments

@zgr024
Copy link

zgr024 commented Jun 18, 2024

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 },
      ],
    },
  ],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant