Skip to content

Commit 2e1a0ab

Browse files
committed
Add documentation on node properties
1 parent a3356e5 commit 2e1a0ab

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,14 @@ class Widget extends React.Component {
7373
| `name` | string | Optional name for the hidden `<input>` element. | `undefined` |
7474
| `nameAsArray` | bool | If true, the hidden `<input>` will encode its values as an array rather than a joined string. | `false` |
7575
| `optimisticToggle` | bool | If true, toggling a partially-checked node will select all children. If false, it will deselect. | `true` |
76+
77+
### Node Properties
78+
79+
Individual nodes within the `nodes` property can have the following structure:
80+
81+
| Property | Type | Description |
82+
| ---------- | ------ | ------------------------------- |
83+
| `label` | string | **Required**. The node's label. |
84+
| `value` | mixed | **Required**. The node's value. |
85+
| `children` | array | An array of child nodes. |
86+
| `icon` | mixed | A custom icon for the node. |

0 commit comments

Comments
 (0)