Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Clearing a multi-select table selection
I have a table that allows multiple selections. When I select an item or several items (using the shift or control key) it works. But I can't seem to clear
all the selections. I tried myTable.select(null) which works on my single select tables, but on this one nothing seems to happen. I hope I'm missing something simple in the API - how do I clear all the selections in a multi-select table?
Use myTable.setValue(null). That should do it.
I will try that - thanks very much!
Hi, i hav got the same problem here.
It visually unselect rows but next time i do table.getValue() the old selected items are back. :(
That definitely should not happen - most likely something is wrong elsewhere in the application.
In multi-select mode, Table.select(Object) just adds something to the selection, but setValue(null) or setValue(Collections.emptySet()) should clear the selection completely.
Which Vaadin version are you using?
Can you reproduce this with a minimal test program?
Also, make sure that null selection is allowed (setNullSelectionAllowed(true)) although it should be the default.
This problem is still here in version 7.7.3
I'm using drag&drop from a table to another table, checking selection to drag multiple row (very dummy mode), but I get same selection untill I manually click a new table row.