GridContextMemu counter intuitive behavior

I am new to vaadin and quite excited I must say. However, I came across a weird behavior when using GridContextMemu. That is, I get a context menu when right clicking anywhere on the grid, even outside any row (target). I would expect context menus to be activated only when right clicking on a grid row. Maybe there’s some other approach to achieve this, a context menu attached to the row and not the grid as a whole, but haven’t found anything… Anyone else has noticed this?

Hello!
Try use setDynamicContentHandler method:

var menu = grid.addContextMenu();
menu.setDynamicContentHandler(Objects::nonNull);

See, these little things that make the difference… Thank you.