diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-07-01 14:27:30 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-07-02 12:19:42 +0000 |
commit | 22ea8caf78f6690ed4414bd0085af7c5bfc21e46 (patch) | |
tree | e3db86722c01d1eac9abac8331bb54504775636a /client | |
parent | bab0975e1288af9079780a030c439b0c2be832ac (diff) | |
download | vaadin-framework-22ea8caf78f6690ed4414bd0085af7c5bfc21e46.tar.gz vaadin-framework-22ea8caf78f6690ed4414bd0085af7c5bfc21e46.zip |
Fix Grid details on sort to display them on correct rows (#18224)
Due to the nature of Container this is only achieved by removing any
existing details and reopening those after the sort is done.
Change-Id: Ic42186ed85981d5dad4ff0948aa22f7a0404480d
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/widgets/Grid.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/widgets/Grid.java b/client/src/com/vaadin/client/widgets/Grid.java index fef6a01640..56b081f6b3 100644 --- a/client/src/com/vaadin/client/widgets/Grid.java +++ b/client/src/com/vaadin/client/widgets/Grid.java @@ -5972,6 +5972,12 @@ public class Grid<T> extends ResizeComposite implements RowContainer body = escalator.getBody(); int oldSize = body.getRowCount(); + // Hide all details. + Set<Integer> oldDetails = new HashSet<Integer>(visibleDetails); + for (int i : oldDetails) { + setDetailsVisible(i, false); + } + if (newSize > oldSize) { body.insertRows(oldSize, newSize - oldSize); cellFocusHandler.rowsAddedToBody(Range.withLength(oldSize, |