How to select only one row, prevent unselecting an element in singleleselect mode

My question is very simple, but I really have not found any solution here. I have a table setSelectable (true), setMultiselect (false), setImmediate (true).

It works great when you first click and moves around the table using the arrows. But if I click on the row already selected again, then it becomes unselected. How to prevent this? I would like to keep only one row, always selected.

+4
source share
1 answer

As from the book of Vaadin here :

, , . , setNullSelectionAllowed (false).

:

table.setNullSelectionAllowed(false);
+6

Source: https://habr.com/ru/post/1531923/


All Articles