Treegrid expansion on every parent node hits a server call to get child row

Treegrid expansion on every parent node hits a server call to fetch child rows, is there a way i can fetch all child rows in one go.
I tried expandAll method but that render the Treegrid in expanded state and still some of the child rows are still being loaded when i scroll down the grid.
What i need is all child rows on page load(to avoid multiple server calls) and all Parents collapsed.

Hi,

There is a ticket about it: https://github.com/vaadin/vaadin-grid/issues/1914

But unfortunately there is no solution/workaround I think.

Thanks for the response Jean. This looks to be pretty basic scenario and a performance hit.Wondering no one from Vaadin team looked into it.

Hi,

You check the status in the ticket. Some improvement has been done ( Maybe you can .
This comment gives a good explanation why it’s slow for your usecase.
https://github.com/vaadin/vaadin-grid/issues/1914#issuecomment-683806711