Skip to content
+

Simple Tree View - Selection

Learn how to enable item selection for the Tree View component.

Multi selection

Apply the multiSelect prop on the Tree View to let users select multiple items.

Disable selection

Use the disableSelection prop if you don't want your items to be selectable:

Checkbox selection

To activate checkbox selection set checkboxSelection={true}:

This is also compatible with multi selection:

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.

Track item selection change

Use the onItemSelectionToggle prop if you want to react to an item selection change:

No item selection recorded

API

See the documentation below for a complete reference to all of the props and classes available to the components mentioned here.