You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 16, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,26 @@ Sets the treeview styling. Defaults to `src/themes/default`.
101
101
102
102
Sets the treeview animations. Set to `false` if you want to turn off animations. See [velocity-react](https://github.com/twitter-fabric/velocity-react) for more details. Defaults to `src/themes/animations`.
103
103
104
+
#### enableCheckbox
105
+
`PropTypes.bool`
106
+
Enable / disable checkbox element for each node. Defaults to `false`.
107
+
108
+
#### checkboxField
109
+
`PropTypes.string`
110
+
To set the checkbox field value which need to be used. Defaults to `name`.
111
+
112
+
#### handleCheckbox
113
+
`PropTypes.func`
114
+
115
+
Callback function when a checbox is checked / unchecked. Passes 2 attributes: the data node and it's checked boolean value.
116
+
117
+
```
118
+
handleCheckbox(node, isChecked) {
119
+
node.checked = isChecked;
120
+
this.setState({cursor: node});
121
+
}
122
+
```
123
+
104
124
#### decorators
105
125
`PropTypes.object`
106
126
@@ -157,6 +177,7 @@ const decorators = {
157
177
loading:'[optional] boolean',
158
178
decorators:'[optional] object',
159
179
animations:'[optional] object'
180
+
checked:'[optional] boolean'
160
181
},
161
182
```
162
183
#### id
@@ -179,3 +200,6 @@ Loading flag. It will populate the treeview with the loading component. Useful w
179
200
180
201
#### decorators / animations
181
202
Attach specific decorators / animations to a node. Provides the low level functionality to create visuals on a node-by-node basis. These structures are the same as the top level props, described above.
203
+
204
+
#### checked
205
+
Checked flag. Validate node checkbox should display as checked or not .
0 commit comments