diff options
author | Adam Wagner <wbadam@users.noreply.github.com> | 2018-01-29 14:48:28 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2018-01-29 14:48:28 +0200 |
commit | eb398be6f7884bc10239daab7689dd82ae643f7d (patch) | |
tree | 8a40cbaba2a6d01ce3203a9fda92cfc16b829956 /client/src | |
parent | fbf5565e30615897124f4c68119bc7cb0a370d8b (diff) | |
download | vaadin-framework-eb398be6f7884bc10239daab7689dd82ae643f7d.tar.gz vaadin-framework-eb398be6f7884bc10239daab7689dd82ae643f7d.zip |
Fix column width in resize event when mode is SIMPLE (#10442)
Diffstat (limited to 'client/src')
-rwxr-xr-x | client/src/main/java/com/vaadin/client/widgets/Grid.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/src/main/java/com/vaadin/client/widgets/Grid.java b/client/src/main/java/com/vaadin/client/widgets/Grid.java index f0b309bae7..4c28ffe244 100755 --- a/client/src/main/java/com/vaadin/client/widgets/Grid.java +++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java @@ -5979,9 +5979,12 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, @Override public void onComplete() { dragEnded(); - col.setWidth(width); - fireEvent(new ColumnResizeEvent<>(col)); + + // Need to wait for column width recalculation + // scheduled by setWidth() before firing the event + Scheduler.get().scheduleDeferred(() -> fireEvent( + new ColumnResizeEvent<>(col))); } }; |