diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-11-30 13:39:28 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-11-30 12:27:41 +0000 |
commit | ed3f08b0385fba7a28269cacd3f20c62e303769f (patch) | |
tree | e3adb794dc7e72f0c6edbb175b090999d18cde56 | |
parent | b021d6199acd666abc729c6c20eaf68b820d1bdb (diff) | |
download | vaadin-framework-ed3f08b0385fba7a28269cacd3f20c62e303769f.tar.gz vaadin-framework-ed3f08b0385fba7a28269cacd3f20c62e303769f.zip |
Fix select all checkbox state update with low row count (#19322)
Change-Id: Ifbaeb2db18ecb6657ae839fec90dbfcaa99be4ac
-rw-r--r-- | server/src/com/vaadin/ui/Grid.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/Grid.java b/server/src/com/vaadin/ui/Grid.java index c75013b8c6..e1c7e894a3 100644 --- a/server/src/com/vaadin/ui/Grid.java +++ b/server/src/com/vaadin/ui/Grid.java @@ -1862,8 +1862,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, } private void updateAllSelectedState() { - if (getState().allSelected != selection.size() >= selectionLimit) { - getState().allSelected = selection.size() >= selectionLimit; + int totalRowCount = getParentGrid().datasource.size(); + int rows = Math.min(totalRowCount, selectionLimit); + if (getState().allSelected != selection.size() >= rows) { + getState().allSelected = selection.size() >= rows; } } |