Skip to content
+

Simple Tree View - Focus

Learn how to focus Tree View items.

Imperative API

Focus a specific item

Use the focusItem API method to focus a specific item.

apiRef.current.focusItem(
  // The DOM event that triggered the change
  event,
  // The ID of the item to focus
  itemId,
);

API

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