TreeGrid in Dialog - reopen dialog collapse grid

Hello,

I added TreeGrid to the dialog. When I open dialog first time tree grid has expanded items.
When i close dialog and reopen it all expanded items are collapsed and i see only root items.

Is there any magic that can leave expanded items after dialog close?

Hi,

I think this is related to this issue: https://github.com/vaadin/vaadin-grid/issues/1820

Hard to say because I cannot expand grid after reopen. Expand method just don’t work.

Only creating new Object of TreeGrid helps.

In my opinion, when you close the dialog the grid is detached then reattached.
The grid component thinks the nodes is expanded (it’s in the list of expanded items) but the component does not expand the node. That’s probably the reason you can’t re-expand the item. (from this comment: https://github.com/vaadin/vaadin-grid/issues/1960#issuecomment-577210573).

The fix should be in the next version of Vaadin 14.4.x. If the next version does not fix your issue then it’s something different.