diff options
author | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2018-06-19 10:49:40 +0300 |
---|---|---|
committer | Ilia Motornyi <elmot@vaadin.com> | 2018-06-19 09:49:40 +0200 |
commit | c99ac74e86d3545cb3b580d73abcb582660808b6 (patch) | |
tree | 654a0e7675573e46feba2e6ea1f89f8ab13050f4 /server/src/main/java/com/vaadin/data | |
parent | 7294ab52fe8a5fd389bac22eeaeeb3cec4f82fbb (diff) | |
download | vaadin-framework-c99ac74e86d3545cb3b580d73abcb582660808b6.tar.gz vaadin-framework-c99ac74e86d3545cb3b580d73abcb582660808b6.zip |
Fix TabSheet attaching and detaching components (#10988)
This patch reverts the fix #10557 and replaces it with a
proper solution from Grid perspective.
Fixes #10987
Fixes #10985
Diffstat (limited to 'server/src/main/java/com/vaadin/data')
-rw-r--r-- | server/src/main/java/com/vaadin/data/provider/DataCommunicator.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/src/main/java/com/vaadin/data/provider/DataCommunicator.java b/server/src/main/java/com/vaadin/data/provider/DataCommunicator.java index 574ed99045..3df69d45f3 100644 --- a/server/src/main/java/com/vaadin/data/provider/DataCommunicator.java +++ b/server/src/main/java/com/vaadin/data/provider/DataCommunicator.java @@ -220,11 +220,6 @@ public class DataCommunicator<T> extends AbstractExtension { public void attach() { super.attach(); attachDataProviderListener(); - - if (getPushRows().isEmpty()) { - // Make sure rows are pushed when component is attached. - setPushRows(Range.withLength(0, getMinPushSize())); - } } @Override @@ -313,6 +308,11 @@ public class DataCommunicator<T> extends AbstractExtension { public void beforeClientResponse(boolean initial) { super.beforeClientResponse(initial); + if (initial && getPushRows().isEmpty()) { + // Make sure rows are pushed when component is attached. + setPushRows(Range.withLength(0, getMinPushSize())); + } + sendDataToClient(initial); } |