aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/src/main/java/com/vaadin/client/ui/treegrid/TreeGridConnector.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/treegrid/TreeGridConnector.java b/client/src/main/java/com/vaadin/client/ui/treegrid/TreeGridConnector.java
index 48ba0562fd..c50da18e53 100644
--- a/client/src/main/java/com/vaadin/client/ui/treegrid/TreeGridConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/treegrid/TreeGridConnector.java
@@ -77,6 +77,8 @@ public class TreeGridConnector extends GridConnector {
private AwaitingRowsState awaitingRowsState = AwaitingRowsState.NONE;
+ private boolean hierarchyColumnUpdateScheduled = false;
+
@Override
public TreeGrid getWidget() {
return (TreeGrid) super.getWidget();
@@ -92,13 +94,16 @@ public class TreeGridConnector extends GridConnector {
* between state change handling for the Grid and its columns. The renderer
* of the column is set in a state change handler, and might not be
* available when this method is executed.
- * <p>
- * TODO: This might need some clean up if we decide to allow setting a new
- * renderer for hierarchy columns.
*/
@OnStateChange("hierarchyColumnId")
void updateHierarchyColumn() {
+ if (hierarchyColumnUpdateScheduled) {
+ return;
+ }
+
Scheduler.get().scheduleFinally(() -> {
+ hierarchyColumnUpdateScheduled = false;
+
// Id of old hierarchy column
String oldHierarchyColumnId = hierarchyColumnId;
@@ -143,6 +148,7 @@ public class TreeGridConnector extends GridConnector {
"Couldn't find column: " + newHierarchyColumnId);
}
});
+ hierarchyColumnUpdateScheduled = true;
}
private HierarchyRenderer getHierarchyRenderer() {