summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJuuso Valli <juuso@vaadin.com>2014-04-23 15:46:16 +0300
committerJuuso Valli <juuso@vaadin.com>2014-04-25 07:39:24 +0000
commit2cfa64db4f709e74b0bbb0a83d3a31d754fd874e (patch)
tree8305245c8728ee80cbb225c3e5eef8f707b4439c /server
parent8e632ae093f53e6822ee2a39b2820be2bcf3e776 (diff)
downloadvaadin-framework-2cfa64db4f709e74b0bbb0a83d3a31d754fd874e.tar.gz
vaadin-framework-2cfa64db4f709e74b0bbb0a83d3a31d754fd874e.zip
Fix Table.sort(...) to update the sort indicator (#8978)
Change-Id: I2df7de7648a8a311a913267ef0d0d0e57f52f19d
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/ui/Table.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/server/src/com/vaadin/ui/Table.java b/server/src/com/vaadin/ui/Table.java
index e23a1bf688..85019a979c 100644
--- a/server/src/com/vaadin/ui/Table.java
+++ b/server/src/com/vaadin/ui/Table.java
@@ -4751,7 +4751,15 @@ public class Table extends AbstractSelect implements Action.Container,
if (refreshingPreviouslyEnabled) {
enableContentRefreshing(true);
}
-
+ if (propertyId.length > 0 && ascending.length > 0) {
+ // The first propertyId is the primary sorting criterion,
+ // therefore the sort indicator should be there
+ sortAscending = ascending[0];
+ sortContainerPropertyId = propertyId[0];
+ } else {
+ sortAscending = true;
+ sortContainerPropertyId = null;
+ }
} else if (c != null) {
throw new UnsupportedOperationException(
"Underlying Data does not allow sorting");