How to select just one row, prevent to unselect item in singleselect mode

后端 未结 1 953
被撕碎了的回忆
被撕碎了的回忆 2021-01-19 11:20

My question is very simple but I really didn\'t find any solution here. I have a Table setSelectable(true), setMultiselect(false), setImmediate(true).

It works fine

相关标签:
1条回答
  • 2021-01-19 11:48

    As from the Vaadin Book here:

    If the user clicks on an already selected item, the selection will deselected and the table property will have null value. You can disable this behaviour by setting setNullSelectionAllowed(false) for the table.

    So:

    table.setNullSelectionAllowed(false);
    
    0 讨论(0)
提交回复
热议问题