Browse Source

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.
tags/8.10.0.alpha1
Anna Koskinen 4 years ago
parent
commit
be5c6b9755
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      server/src/main/java/com/vaadin/ui/Grid.java

+ 1
- 1
server/src/main/java/com/vaadin/ui/Grid.java View File

@@ -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");
}


Loading…
Cancel
Save