Search code examples
vaadin-flowvaadin-gridvaadin23

How to get the selection column from a vaadin-gird in vaadin 23?


I'm using an ItemClickListener on my grid and also multi select mode. Problem is if you click slightly, next to the selection checkbox the click event is fired and all selections are deleted.

My Idea to work around this is to check if the event was fired by the selection column. I can get the clicked column by ItemClickEven<>.getColumn() but I can't find a way to check if this is the selection column. Just getting the first column won't work because reordering is possible. Is there a easy way or do I have to use a work around?


Solution

  • I found by exploiting a bug in my Vaadin version (23.3.2), that all I needed to is to check if ItemClickEvent<>.getColumn() is null. Even it's stated that getColumn() shouldn't return null it does for the selection column.