@@ -89,31 +89,33 @@ All node objects **must** have a unique `value`. This value is serialized into t
8989
9090### Properties
9191
92- | Property | Type | Description | Default |
93- | ------------------ | -------- | ------------------------------------------------------------------------------------------------ | ----------- |
94- | ` nodes ` | array | ** Required** . Specifies the tree nodes and their children. | |
95- | ` checked ` | array | An array of checked node values. | ` [] ` |
96- | ` disabled ` | bool | If true, the component will be disabled and nodes cannot be checked. | ` false ` |
97- | ` expandDisabled ` | bool | If true, the ability to expand nodes will be disabled. | ` false ` |
98- | ` expanded ` | array | An array of expanded node values. | ` [] ` |
99- | ` name ` | string | Optional name for the hidden ` <input> ` element. | ` undefined ` |
100- | ` nameAsArray ` | bool | If true, the hidden ` <input> ` will encode its values as an array rather than a joined string. | ` false ` |
101- | ` nativeCheckboxes ` | bool | If true, native browser checkboxes will be used instead of pseudo-checkbox icons. | ` false ` |
102- | ` noCascade ` | bool | If true, toggling a parent node will ** not** cascade its check state to its children. | ` false ` |
103- | ` optimisticToggle ` | bool | If true, toggling a partially-checked node will select all children. If false, it will deselect. | ` true ` |
104- | ` showNodeIcon ` | bool | If true, each node will show a parent or leaf icon. | ` true ` |
105- | ` onCheck ` | function | onCheck handler: ` function(checked) {} ` | ` () => {} ` |
106- | ` onExpand ` | function | onExpand handler: ` function(expanded) {} ` | ` () => {} ` |
92+ | Property | Type | Description | Default |
93+ | -------------------- | -------- | ------------------------------------------------------------------------------------------------ | ----------- |
94+ | ` nodes ` | array | ** Required** . Specifies the tree nodes and their children. | |
95+ | ` checked ` | array | An array of checked node values. | ` [] ` |
96+ | ` disabled ` | bool | If true, the component will be disabled and nodes cannot be checked. | ` false ` |
97+ | ` expandDisabled ` | bool | If true, the ability to expand nodes will be disabled. | ` false ` |
98+ | ` expanded ` | array | An array of expanded node values. | ` [] ` |
99+ | ` name ` | string | Optional name for the hidden ` <input> ` element. | ` undefined ` |
100+ | ` nameAsArray ` | bool | If true, the hidden ` <input> ` will encode its values as an array rather than a joined string. | ` false ` |
101+ | ` nativeCheckboxes ` | bool | If true, native browser checkboxes will be used instead of pseudo-checkbox icons. | ` false ` |
102+ | ` noCascade ` | bool | If true, toggling a parent node will ** not** cascade its check state to its children. | ` false ` |
103+ | ` onlyLeafCheckboxes ` | bool | If true, checkboxes will only be shown for leaf nodes. | ` false ` |
104+ | ` optimisticToggle ` | bool | If true, toggling a partially-checked node will select all children. If false, it will deselect. | ` true ` |
105+ | ` showNodeIcon ` | bool | If true, each node will show a parent or leaf icon. | ` true ` |
106+ | ` onCheck ` | function | onCheck handler: ` function(checked) {} ` | ` () => {} ` |
107+ | ` onExpand ` | function | onExpand handler: ` function(expanded) {} ` | ` () => {} ` |
107108
108109#### Node Properties
109110
110111Individual nodes within the ` nodes ` property can have the following structure:
111112
112- | Property | Type | Description |
113- | ----------- | ------ | ------------------------------------ |
114- | ` label ` | mixed | ** Required** . The node's label. |
115- | ` value ` | mixed | ** Required** . The node's value. |
116- | ` children ` | array | An array of child nodes. |
117- | ` className ` | string | A className to add to the node. |
118- | ` disabled ` | bool | Whether the node should be disabled. |
119- | ` icon ` | mixed | A custom icon for the node. |
113+ | Property | Type | Description | Default |
114+ | -------------- | ------ | ---------------------------------------- | ------- |
115+ | ` label ` | mixed | ** Required** . The node's label. | |
116+ | ` value ` | mixed | ** Required** . The node's value. | |
117+ | ` children ` | array | An array of child nodes. | ` null ` |
118+ | ` className ` | string | A className to add to the node. | ` null ` |
119+ | ` disabled ` | bool | Whether the node should be disabled. | ` false ` |
120+ | ` icon ` | mixed | A custom icon for the node. | ` null ` |
121+ | ` showCheckbox ` | bool | Whether the node should show a checkbox. | ` true ` |
0 commit comments