From fa5c47f336c148e071a6b16bbd48b49c34d37c5d Mon Sep 17 00:00:00 2001 From: Artur Date: Fri, 23 Dec 2016 08:30:41 +0200 Subject: Fix removal of hidden Grid columns (#8071) Fixes #8018 --- client/src/main/java/com/vaadin/client/widgets/Grid.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'client') 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 extends ResizeComposite implements HasSelectionHandlers, 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(); -- cgit v1.2.3