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

Disable Parent checkbox if have children checkbox

MuhRiswan opened this issue · comments

How to prevent a parent checkbox from being displayed if there are children in it?

There is no direct option to remove parent checkboxes if any child has a checkbox, but you have the following options.

  • Checkboxes can be hidden on a node level by setting showCheckbox: false for any given node.
  • They can also be hidden by the passing the onlyLeafCheckboxes property to the tree, which will force checkboxes to render only on leaf nodes.

thanks sir for answer, i have fix this problem to custome my API with add showCheckbox and condition.