aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2019-10-28 15:10:30 +0200
committerZhe Sun <31067185+ZheSun88@users.noreply.github.com>2019-10-28 15:10:30 +0200
commit1976d032d1fb3ad9e95c6d2fdbbde43c1005b36d (patch)
treeea7b37a0408b18b5ba9ea0a1483a4963e450cc05
parent3817a771e30a0866dc0f4c09c30211083daa4b50 (diff)
downloadvaadin-framework-1976d032d1fb3ad9e95c6d2fdbbde43c1005b36d.tar.gz
vaadin-framework-1976d032d1fb3ad9e95c6d2fdbbde43c1005b36d.zip
Fix the end limit of the allowed scrollTo rows. (#11771) (#11774)
* Fix the end limit of the allowed scrollTo rows. (#11771) - Row index counts up from zero, data provider size counts up from one, as one would expect. If the two match we are already past the available range.
-rw-r--r--server/src/main/java/com/vaadin/ui/Grid.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java
index 8d19d89a7e..1ac71ff984 100644
--- a/server/src/main/java/com/vaadin/ui/Grid.java
+++ b/server/src/main/java/com/vaadin/ui/Grid.java
@@ -4390,7 +4390,7 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents,
Objects.requireNonNull(destination,
"ScrollDestination can not be null");
- if (row > getDataCommunicator().getDataProviderSize()) {
+ if (row >= getDataCommunicator().getDataProviderSize()) {
throw new IllegalArgumentException("Row outside dataProvider size");
}