From aa5546133d5f93a465f36c93b14e7c9d87f4c0c5 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Mon, 2 Jul 2018 15:43:02 +0300 Subject: Fix expanding an added TreeGrid node (#11018) Fixes #9997 --- .../main/java/com/vaadin/data/provider/DataCommunicator.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'server') 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 3df69d45f3..f5d2d087e6 100644 --- a/server/src/main/java/com/vaadin/data/provider/DataCommunicator.java +++ b/server/src/main/java/com/vaadin/data/provider/DataCommunicator.java @@ -665,7 +665,8 @@ public class DataCommunicator extends AbstractExtension { if (isAttached()) { attachDataProviderListener(); } - hardReset(); + reset = true; + markAsDirty(); return filter -> { if (this.dataProvider != dataProvider) { @@ -764,16 +765,12 @@ public class DataCommunicator extends AbstractExtension { generators.forEach(g -> g.refreshData(item)); getUI().access(() -> refresh(item)); } else { - getUI().access(this::hardReset); + reset = true; + getUI().access(() -> markAsDirty()); } }); } - private void hardReset() { - reset = true; - markAsDirty(); - } - private void detachDataProviderListener() { if (dataProviderUpdateRegistration != null) { dataProviderUpdateRegistration.remove(); -- cgit v1.2.3