aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorAnthony Guerreiro <anthony@vaadin.com>2014-07-15 16:24:48 +0300
committerAnthony Guerreiro <anthony@vaadin.com>2014-07-29 09:39:28 +0100
commitf7dc719ec5d9ba2c10362f4a175a9d764dc537bb (patch)
tree71b486c3d5589e841b2a8d0a3675baf1dc5238f4 /client
parente5dfe0369cbaa249f690b1c73afc8db1f561ef22 (diff)
downloadvaadin-framework-f7dc719ec5d9ba2c10362f4a175a9d764dc537bb.tar.gz
vaadin-framework-f7dc719ec5d9ba2c10362f4a175a9d764dc537bb.zip
Fix Table stuck scroll position after setting scroll to last page (#14147)
Change-Id: I9c39db5c2ccafd495a1ecc8b28687eeeebe3b6c2
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/VScrollTable.java6
-rw-r--r--client/src/com/vaadin/client/ui/table/TableConnector.java3
2 files changed, 8 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java
index 5e6207f53f..ba90c0dfed 100644
--- a/client/src/com/vaadin/client/ui/VScrollTable.java
+++ b/client/src/com/vaadin/client/ui/VScrollTable.java
@@ -1185,7 +1185,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
@Override
public void execute() {
- if (firstvisible > 0) {
+ if (firstvisible >= 0) {
firstRowInViewPort = firstvisible;
if (firstvisibleOnLastPage > -1) {
scrollBodyPanel
@@ -7925,4 +7925,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
addCloseHandler.removeHandler();
}
}
+
+ public void totalRowsChanged() {
+ firstvisibleOnLastPage = -1;
+ }
}
diff --git a/client/src/com/vaadin/client/ui/table/TableConnector.java b/client/src/com/vaadin/client/ui/table/TableConnector.java
index d37fd36522..04a2dfc3c4 100644
--- a/client/src/com/vaadin/client/ui/table/TableConnector.java
+++ b/client/src/com/vaadin/client/ui/table/TableConnector.java
@@ -146,6 +146,9 @@ public class TableConnector extends AbstractHasComponentsConnector implements
getWidget().updatePageLength(uidl);
getWidget().updateFirstVisibleAndScrollIfNeeded(uidl);
+ if (totalRowsChanged == true) {
+ getWidget().totalRowsChanged();
+ }
getWidget().showRowHeaders = uidl.getBooleanAttribute("rowheaders");
getWidget().showColHeaders = uidl.getBooleanAttribute("colheaders");