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
Copy file name to clipboardExpand all lines: docs/pages/api/tree-item.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,7 @@ Any other props supplied will be provided to the root element (native element).
48
48
|:-----|:-------------|:------------|
49
49
| <spanclass="prop-name">root</span> | <spanclass="prop-name">.MuiTreeItem-root</span> | Styles applied to the root element.
50
50
| <spanclass="prop-name">expanded</span> | <spanclass="prop-name">.Mui-expanded</span> | Pseudo-class applied to the root element when expanded.
51
+
| <spanclass="prop-name">selected</span> | <spanclass="prop-name">.Mui-selected</span> | Pseudo-class applied to the root element when selected.
51
52
| <spanclass="prop-name">group</span> | <spanclass="prop-name">.MuiTreeItem-group</span> | Styles applied to the `role="group"` element.
52
53
| <spanclass="prop-name">content</span> | <spanclass="prop-name">.MuiTreeItem-content</span> | Styles applied to the tree node content.
53
54
| <spanclass="prop-name">iconContainer</span> | <spanclass="prop-name">.MuiTreeItem-iconContainer</span> | Styles applied to the tree node icon and collapse/expand icon.
| <spanclass="prop-name">defaultExpandIcon</span> | <spanclass="prop-type">node</span> || The default icon used to expand the node. |
33
33
| <spanclass="prop-name">defaultParentIcon</span> | <spanclass="prop-type">node</span> || The default icon displayed next to a parent node. This is applied to all parent nodes and can be overridden by the TreeItem `icon` prop. |
34
+
| <spanclass="prop-name">defaultSelected</span> | <spanclass="prop-type">Array<string><br>| string</span> | <spanclass="prop-default">[]</span> | Selected node ids. (Uncontrolled) When `multiSelect` is true this takes an array of strings; when false (default) a string. |
35
+
| <spanclass="prop-name">disableSelection</span> | <spanclass="prop-type">bool</span> | <spanclass="prop-default">false</span> | If `true` selection is disabled. |
| <spanclass="prop-name">multiSelect</span> | <spanclass="prop-type">bool</span> | <spanclass="prop-default">false</span> | If true `ctrl` and `shift` will trigger multiselect. |
38
+
| <spanclass="prop-name">onNodeSelect</span> | <spanclass="prop-type">func</span> || Callback fired when tree items are selected/unselected.<br><br>**Signature:**<br>`function(event: object, value: undefined) => void`<br>*event:* The event source of the callback<br>*value:* of the selected nodes. When `multiSelect` is true this is an array of strings; when false (default) a string. |
35
39
| <spanclass="prop-name">onNodeToggle</span> | <spanclass="prop-type">func</span> || Callback fired when tree items are expanded/collapsed.<br><br>**Signature:**<br>`function(event: object, nodeIds: array) => void`<br>*event:* The event source of the callback.<br>*nodeIds:* The ids of the expanded nodes. |
40
+
| <spanclass="prop-name">selected</span> | <spanclass="prop-type">Array<string><br>| string</span> || Selected node ids. (Controlled) When `multiSelect` is true this takes an array of strings; when false (default) a string. |
0 commit comments