Grid / TreeGrid render hook

Is there an event/hook for knowing when the rendering of rows within a grid component has finished?
We want to implement the following use case for a TreeGrid:

  • drag a row onto a new parent
  • trigger “refreshAll” to update the hierarchy
  • show a loading spinner until the rendering of the TreeGrid is complete

Not to my knowledge, no.

It’s probably easier to do it on the dataprovider (set Loading true when you are starting to load the data then loading false when it’s done) but it won’t help if the slowness is during the rendering.

Yeah the rendering is the issue for us.
Its quite confusing for the user after a row gets dropped onto a new parent since we need to re-render the entire TreeGrid with “refreshAll”

You should be able to refreshItem only the new parent with recursive = true.
You might find some workarounds here: TreeGrid refreshAll does not retain collapse/expand state · Issue #1050 · vaadin/flow-components · GitHub

Last time i tried refreshItem it was super buggy with new parents but i will give it another go with the workarounds described