Simple Tree View - Selection
Learn how to enable item selection for the Tree View component.
Single selection
By default, the Tree View allows selecting a single item.
- Data Grid
- Date and Time Pickers
- Charts
- Tree View
Multi selection
Use the multiSelect
prop to enable multi-selection.
- Data Grid
- Date and Time Pickers
- Charts
- Tree View
Disable selection
Use the disableSelection
prop if you don't want your items to be selectable:
- Data Grid
- Date and Time Pickers
- Charts
- Tree View
Checkbox selection
To activate checkbox selection set checkboxSelection={true}
:
- Data Grid
- Date and Time Pickers
- Charts
- Tree View
This is also compatible with multi selection:
- Data Grid
- Date and Time Pickers
- Charts
- Tree View
Controlled selection
Use the selectedItems
prop to control selected Tree View items.
You can also use the onSelectedItemsChange
prop to listen to changes in the selected items and update the prop accordingly.
- Data Grid
- Date and Time Pickers
- Charts
- Tree View
Track item selection change
Use the onItemSelectionToggle
prop if you want to react to an item selection change:
No item selection recorded
- Data Grid
- Date and Time Pickers
- Charts
- Tree View
API
See the documentation below for a complete reference to all of the props and classes available to the components mentioned here.