GridContextMenu do I have to add it to the same layout where the grid is?

Hi,

after creating a context menu like in the example https://vaadin.com/docs/latest/components/grid/#context-menu it is added to the same layout where the grid is.

add(grid, contextMenu);

Is this needed? It has some purpose? I see that it works even without adding it.

Thanks

No I think this is a mistake on the documentation

Ok thanks

Made a PR to fix this: Update GridContextMenuExample.java by mstahv · Pull Request #2003 · vaadin/docs · GitHub