Dynamically generate submenu for MenuBar MenuItem?

I would like to create a MenuBar item with a submenu that adapts to the content in the current view.
Tried to do it on ClickEvent, but then I just got a submenu that closed itself again at once.
( I suspect I saw the previous submenu content, and that it closed itself when I called subMenu.removeAll() )

I think you’re describing this missing feature: Callback before opening submenu · Issue #1184 · vaadin/flow-components · GitHub

Yes, looks like that issue covers it. Thanks for doing a better search than I managed :slightly_smiling_face:
It is almost 4 years old though, so I’ll not hold my breath.
Thankfully, I can work around it by adjusting the menu as the view content changes, so that it is ready when the user clicks on it.