aboutsummaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
authorTarek Oraby <42799254+tarekoraby@users.noreply.github.com>2020-06-18 08:41:19 +0300
committerGitHub <noreply@github.com>2020-06-18 08:41:19 +0300
commitd824efe59a71e2eb3e554873a32d92ca5d34cc5e (patch)
treeb9deefb270d79ba4163e0f2a8e2cb66be72b446d /client/src
parent9e8671890a721330aaf621e24159f53762f9827f (diff)
downloadvaadin-framework-d824efe59a71e2eb3e554873a32d92ca5d34cc5e.tar.gz
vaadin-framework-d824efe59a71e2eb3e554873a32d92ca5d34cc5e.zip
Fix rendering of TreeGrid's frozen columns after hierarchy-column reset (#12028)
* Add tests * Fix getVisibleFrozenColumnCount() if SelectionMode is multi
Diffstat (limited to 'client/src')
-rwxr-xr-xclient/src/main/java/com/vaadin/client/widgets/Grid.java10
1 files changed, 9 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 2faddaf68d..9f36864bc8 100755
--- a/client/src/main/java/com/vaadin/client/widgets/Grid.java
+++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java
@@ -7416,7 +7416,15 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
// for the escalator the hidden columns are not in the frozen column
// count, but for grid they are. thus need to convert the index
- for (int i = 0; i < frozenColumnCount; i++) {
+ int limit = getFrozenColumnCount();
+ if (getSelectionColumn().isPresent()) {
+ // If the grid is in MultiSelect mode, getColumn(0) in the following
+ // for loop returns the selection column. Accordingly, verifying
+ // which frozen columns are visible if the selection column is
+ // present should take this fact into account.
+ limit++;
+ }
+ for (int i = 0; i < limit; i++) {
if (i >= getColumnCount() || getColumn(i).isHidden()) {
numberOfColumns--;
}