aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTatu Lund <tatu@vaadin.com>2020-04-20 14:55:01 +0300
committerGitHub <noreply@github.com>2020-04-20 14:55:01 +0300
commit565eeb5b5a85e6ce6310e0098977f853869f01ba (patch)
tree948e807d30003efc9405c67ccb38c49de595eaef
parent6781bc636ea908d449a8b57227f309662002a332 (diff)
downloadvaadin-framework-565eeb5b5a85e6ce6310e0098977f853869f01ba.tar.gz
vaadin-framework-565eeb5b5a85e6ce6310e0098977f853869f01ba.zip
Add multiselect column compensation (#11951)
-rwxr-xr-xclient/src/main/java/com/vaadin/client/widgets/Grid.java6
1 files changed, 5 insertions, 1 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 908446dfee..01c069143b 100755
--- a/client/src/main/java/com/vaadin/client/widgets/Grid.java
+++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java
@@ -5322,8 +5322,12 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
} else {
this.hidden = hidden;
- final int columnIndex = grid.getVisibleColumns()
+ int columnIndex = grid.getVisibleColumns()
.indexOf(this);
+ // Correct column index for multiselect mode
+ if (grid.getSelectionColumn().isPresent()) {
+ columnIndex--;
+ }
grid.escalator.getColumnConfiguration()
.insertColumns(columnIndex, 1);