TreeGrid with Auto scroll with large amount of data

Vaadin version: 22
we are using TreeGrid and have implemented lazy loading with AbstractHierarchicalDataProvider<Item, Void>. Our TreeGrid contains 3,000 records with multilevel Hierarchical. If I want to add one or more records, the new records should be added at the bottom of the TreeGrid Hierarchical. the newly added item should be automatically selected and the view should scroll down to that particular item.
How can we achieve this?

I would be tempted to suggest using TreeTable component from the Viritin add-on instead of TreeGrid. But that is for Vaadin 24…

Hi @Matti , thank you for your reply. Is there an alternative option to achieve this?

You could try copying the class directy to your project. I haven’t investigated if there are big changes with the web component it is based on. If not, it might work in Vaadin 22 with pretty minimalistic changes.

But I’d really suggest to check to get rid of that Vaadin 22 (and Java 8 :thinking:), looks like its commercial support is ending in couple of days.