summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2014-05-02 09:08:12 +0300
committerArtur Signell <artur@vaadin.com>2014-05-02 09:08:13 +0300
commit2cd5d4f143f635475662ba19d42ecf8d208a9d79 (patch)
tree1ca638c9fb3b5101182b40c5f5724a7157aed824 /client
parentc98286e22c32b56a75b21d629c8b5968856d1ae1 (diff)
parenta86798ca4d5bae6e07e61a79665db40e9364dff3 (diff)
downloadvaadin-framework-2cd5d4f143f635475662ba19d42ecf8d208a9d79.tar.gz
vaadin-framework-2cd5d4f143f635475662ba19d42ecf8d208a9d79.zip
Merge changes from origin/7.2
15e24ec Fix too wide Table columns while sorting from init (#13517) a86798c Fix ScreenshotTB3Test removing reference images Change-Id: Iec1c2caceb99a6c8cfad9a0911d4a9cd7a23db36
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/VScrollTable.java9
-rw-r--r--client/src/com/vaadin/client/ui/table/TableConnector.java10
2 files changed, 11 insertions, 8 deletions
diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java
index b0cd614e42..2db4fe85b8 100644
--- a/client/src/com/vaadin/client/ui/VScrollTable.java
+++ b/client/src/com/vaadin/client/ui/VScrollTable.java
@@ -1132,6 +1132,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
// cell to accomodate for the size of the sort arrow.
HeaderCell sortedHeader = tHead.getHeaderCell(sortColumn);
if (sortedHeader != null) {
+ // Mark header as sorted now. Any earlier marking would lead to
+ // columns with wrong sizes
+ sortedHeader.setSorted(true);
tHead.resizeCaptionContainer(sortedHeader);
}
// Also recalculate the width of the captionContainer element in the
@@ -3344,11 +3347,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (col.hasAttribute("sortable")) {
c.setSortable(true);
- if (cid.equals(sortColumn)) {
- c.setSorted(true);
- } else {
- c.setSorted(false);
- }
+ c.setSorted(false);
} else {
c.setSortable(false);
}
diff --git a/client/src/com/vaadin/client/ui/table/TableConnector.java b/client/src/com/vaadin/client/ui/table/TableConnector.java
index 610f2f8010..d2bd06a753 100644
--- a/client/src/com/vaadin/client/ui/table/TableConnector.java
+++ b/client/src/com/vaadin/client/ui/table/TableConnector.java
@@ -303,9 +303,13 @@ public class TableConnector extends AbstractHasComponentsConnector implements
getWidget().tabIndex = getState().tabIndex;
getWidget().setProperTabIndex();
- if (getWidget().initializedAndAttached) {
- getWidget().resizeSortedColumnForSortIndicator();
- }
+ Scheduler.get().scheduleFinally(new ScheduledCommand() {
+
+ @Override
+ public void execute() {
+ getWidget().resizeSortedColumnForSortIndicator();
+ }
+ });
// Remember this to detect situations where overflow hack might be
// needed during scrolling