summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorTatu Lund <tatu@vaadin.com>2020-04-28 13:12:08 +0300
committerGitHub <noreply@github.com>2020-04-28 13:12:08 +0300
commit599387b330f66f0dbe6087d2fe829bc251fef6c1 (patch)
tree5ab0104b500bbf52fbd40f92cf331835e8ecbfe9 /client
parentfb5e0c2fe112908a1390696a2d415583c94f524b (diff)
downloadvaadin-framework-599387b330f66f0dbe6087d2fe829bc251fef6c1.tar.gz
vaadin-framework-599387b330f66f0dbe6087d2fe829bc251fef6c1.zip
Fix hiding / un-hiding with frozen columns in multiselect mode (#11972)
The previous patch https://github.com/vaadin/framework/pull/11951 did fix the problem (frozen column indicator wrongly positioned) it was meant to, but caused a regression in hiding / un-hiding. This new fix addresses both problems, i.e. it applies multiselect column compensation in other way, without causing problem in hiding / un-hiding logic Fixes https://github.com/vaadin/framework/issues/11970
Diffstat (limited to 'client')
-rwxr-xr-xclient/src/main/java/com/vaadin/client/widgets/Grid.java8
1 files changed, 4 insertions, 4 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 01c069143b..6d22dfc5ca 100755
--- a/client/src/main/java/com/vaadin/client/widgets/Grid.java
+++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java
@@ -5324,10 +5324,6 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
int columnIndex = grid.getVisibleColumns()
.indexOf(this);
- // Correct column index for multiselect mode
- if (grid.getSelectionColumn().isPresent()) {
- columnIndex--;
- }
grid.escalator.getColumnConfiguration()
.insertColumns(columnIndex, 1);
@@ -5335,6 +5331,10 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
// escalator doesn't handle situation where the added column
// would be the last frozen column
int gridFrozenColumns = grid.getFrozenColumnCount();
+ // Correct column index for multiselect mode
+ if (grid.getSelectionColumn().isPresent()) {
+ gridFrozenColumns++;
+ }
int escalatorFrozenColumns = grid.escalator
.getColumnConfiguration().getFrozenColumnCount();
if (gridFrozenColumns > escalatorFrozenColumns