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
@@ -91,7 +91,8 @@ The `TreeView` control can be configured with the following properties:
91
91
| items | ITreeItem[] | yes | An array of tree items to display. refer [example](#example-of-array-of-tree-items-used-to-render-control-as-in-first-screenshot). |
92
92
| defaultExpanded | boolean | no | Specify if the tree items are displayed as expanded by default (defaults to false. |
93
93
| selectionMode | enum | no | Specifies the selection mode of tree view (defaults to Single selection). |
94
-
| selectChildrenIfParentSelected | boolean | no | Specifies if the childrens should be selected when parent item is selected (defaults to false). |
94
+
| selectChildrenIfParentSelected | boolean | no | Specifies if the children should be selected when parent item is selected (defaults to false). __Deprecated__: prefer usage of `selectChildrenMode` for more flexibility. |
95
+
| selectChildrenMode | SelectChildrenMode | no | Specifies if the children should be selected when parent item is selected (defaults to None). Flagged enum, values can be combined eg. `SelectChildrenMode.Select \|SelectChildrenMode.Unselect` |
95
96
| showCheckboxes | boolean | yes | Specify if the checkboxes should be displayed for selection. |
96
97
| treeItemActionsDisplayMode | TreeItemActionsDisplayMode | no | Specifies the display mode of the tree item actions. |
97
98
| defaultSelectedKeys | string[] | no | Specifies keys of items to be selected by default. |
@@ -111,6 +112,19 @@ Specifies the selection mode of tree item.
111
112
| Multiple |
112
113
| None |
113
114
115
+
Enum `SelectChildrenMode`
116
+
117
+
Specifies when the children of a selected item need to be automatically selected.
| Select | When selecting an item, its children are also selected |
123
+
| Unselect | When unselecting an item, its children are also unselected |
124
+
| Mount | When the component is mounted, all children of selected items are also selected |
125
+
| Update | When the component receives new props, all children of selected items are also selected |
126
+
| All | Shorthand for a combination of all of the above, same as `SelectChildrenMode.Select \|SelectChildrenMode.Unselect \|SelectChildrenMode.Mount \|SelectChildrenMode.Update` | |
127
+
114
128
Interface `ITreeItem`
115
129
116
130
Each tree item in the `treeitems` property is defined as `ITreeItem` as follows:
* Specifies if the childrens should be selected when parent is selected.
33
43
* By default this is set to false.
34
44
*/
35
45
selectChildrenIfParentSelected?: boolean;
46
+
/**
47
+
* Specifies if the childrens should be selected when parent is selected. Flagged enum, so values can be combined eg. SelectChildrenMode.Select | SelectChildrenMode.Unselect
48
+
* By default this is set to None.
49
+
*/
50
+
selectChildrenMode?: SelectChildrenMode;
36
51
/**
37
52
* Specifies if the checkboxes should be displayed for selection.
0 commit comments