diff options
Diffstat (limited to 'src/com/vaadin/ui/Table.java')
-rw-r--r-- | src/com/vaadin/ui/Table.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java index 5085f5b568..ff83a9ef2e 100644 --- a/src/com/vaadin/ui/Table.java +++ b/src/com/vaadin/ui/Table.java @@ -1091,7 +1091,9 @@ public class Table extends AbstractSelect implements Action.Container, } if (index > maxIndex) { - setCurrentPageFirstItemIndex(maxIndex); + // Note that we pass index, not maxIndex, letting + // setCurrentPageFirstItemIndex handle the situation. + setCurrentPageFirstItemIndex(index); return; } @@ -1370,9 +1372,11 @@ public class Table extends AbstractSelect implements Action.Container, maxIndex = 0; } - // Ensures that the new value is valid + // Assume that we want to scroll to the very bottom (so that the bottom + // row is completely visible even if (table height) / (row height) is + // not an integer.) if (newIndex > maxIndex) { - newIndex = maxIndex; + newIndex = maxIndex + 1; } // Refresh first item id |