New to KendoReact? Start a free 30-day trial
Scrolling to a Selected Item in KendoReact TreeView
Updated on Dec 19, 2025
Environment
| Product Version | 9.0.0 |
| Product | Progress® KendoReact TreeView |
Description
I want to automatically scroll to a selected item in the TreeView component for React. How can I achieve this functionality in the React TreeView component?
This KB article also answers the following questions:
- How to ensure the selected item in a React TreeView is visible?
- How to programmatically scroll to an item in React TreeView?
- How can I focus on a selected item in TreeView using React?
Solution
To scroll to a selected item in the TreeView for React, modify the select variable passed to the processTreeViewItems method. This approach updates the TreeView data state, ensuring the selected item is visible to the user.
Once the desired item is selected, you can call the scrollIntoView method of the selected tree node like demonstrated in the demo below:
Change Theme
Theme
Loading ...