diff options
author | Artur <artur@vaadin.com> | 2016-12-23 08:30:41 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2016-12-23 08:30:41 +0200 |
commit | fa5c47f336c148e071a6b16bbd48b49c34d37c5d (patch) | |
tree | 2198d1dcfa3a090c83150cc2b8eda51a201500a8 /client | |
parent | 813c53c5260486757b3ef4d6dfe33ac73c75af32 (diff) | |
download | vaadin-framework-fa5c47f336c148e071a6b16bbd48b49c34d37c5d.tar.gz vaadin-framework-fa5c47f336c148e071a6b16bbd48b49c34d37c5d.zip |
Fix removal of hidden Grid columns (#8071)
Fixes #8018
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/widgets/Grid.java | 10 |
1 files changed, 8 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 8c71b3fe66..b0735a595e 100644 --- a/client/src/main/java/com/vaadin/client/widgets/Grid.java +++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java @@ -6463,8 +6463,14 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, int columnIndex = columns.indexOf(column); // Remove from column configuration - escalator.getColumnConfiguration() - .removeColumns(getVisibleColumns().indexOf(column), 1); + int visibleColumnIndex = getVisibleColumns().indexOf(column); + if (visibleColumnIndex < 0) { + assert column.isHidden(); + // Hidden columns are not included in Escalator + } else { + getEscalator().getColumnConfiguration().removeColumns(visibleColumnIndex, + 1); + } updateFrozenColumns(); |