Grid keeps selected object event if it is not present after filtering any m

Hello All,

I am new to vaadin. Currenty I am building an app with database access. I constructed a SqlDataProvider, which applies filter criteria directly to the query, so that the data is not filtered in memory, it is not selected any more. Please find attached the following scenario:

Button “Relocate” is enabled or disabled depending on selection in the table (a row is selected = button becomes enabled via SelectionListener of the Grid). So, Img 1 = initial state (no selection, Button disabled), Img 2 = a row is selected, Button is enabled, Img 3 = Filter is applied, no data in the table, Button still enabled.

The data is in fact still in the selection model and can be retrieved.

Am I doing something wrong?

Thankx,

YDzh
17416904.png
17416907.png
17416910.png