aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-02-26 11:29:02 +0200
committerLeif Åstrand <leif@vaadin.com>2015-03-03 11:19:15 +0000
commit91564dfe760d593fdd55aa4f820d6f2fdc181065 (patch)
tree316d40da3f9adc0856373a4c921f960067fb1ca3 /client
parentf79b9788842cefc50a58aafd476eaa7b817c92f1 (diff)
downloadvaadin-framework-91564dfe760d593fdd55aa4f820d6f2fdc181065.tar.gz
vaadin-framework-91564dfe760d593fdd55aa4f820d6f2fdc181065.zip
Make Grid recalculate columns on resize (#16539)
Change-Id: Ib2b9ecc995ec6fe2627c545efc2a312a59df6b9c
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/widgets/Grid.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/widgets/Grid.java b/client/src/com/vaadin/client/widgets/Grid.java
index f0b5e59059..3c2d070fa0 100644
--- a/client/src/com/vaadin/client/widgets/Grid.java
+++ b/client/src/com/vaadin/client/widgets/Grid.java
@@ -6182,6 +6182,23 @@ public class Grid<T> extends ResizeComposite implements
}
}
+ @Override
+ public void onResize() {
+ super.onResize();
+ /*
+ * Delay calculation to be deferred so Escalator can do it's magic.
+ */
+ Scheduler.get().scheduleDeferred(new ScheduledCommand() {
+
+ @Override
+ public void execute() {
+ if (!autoColumnWidthsRecalculator.isScheduled()) {
+ autoColumnWidthsRecalculator.schedule();
+ }
+ }
+ });
+ }
+
/**
* Grid does not support adding Widgets this way.
* <p>