How to "refresh" SelectionChangeListener in Grid (vaadin 8.5.2) after chang

When changing the selection Mode (done by valueChange in Checkbox), the Grid redraws fine, but the SelectionListener does not work. I made a workaround by creating the grid new, which works, but turns out to be very slow. Is there another possibility?
Thank you for advice!

Have you tried unregistering (by the Registration object that is returned when adding the listener) and re-adding the selectionlistener instead?

-Olli

Works perfectly, thank you so much!

Nice! That might be a bug, but at least there’s an easy workaround.

-Olli