diff options
author | Tatu Lund <tatu@vaadin.com> | 2019-07-30 09:42:20 +0300 |
---|---|---|
committer | Zhe Sun <31067185+ZheSun88@users.noreply.github.com> | 2019-07-30 09:42:20 +0300 |
commit | 2b5ea21ff86f3a1152fd817fc2c1e5e9f9e25d2e (patch) | |
tree | b452bb64f7a34b04dc15fd5a314cc2a48ca61285 /client/src | |
parent | 3a1f595b82dd031fecdf8c43f921f9b0b5c96853 (diff) | |
download | vaadin-framework-2b5ea21ff86f3a1152fd817fc2c1e5e9f9e25d2e.tar.gz vaadin-framework-2b5ea21ff86f3a1152fd817fc2c1e5e9f9e25d2e.zip |
Apply offset to column index depending on presense of selection column (#11667)
* Apply offset to column index depending on presense of selection column
After testing this manually I noticed that offset correction needs to be negative
* Add the testing UI
Diffstat (limited to 'client/src')
-rwxr-xr-x | client/src/main/java/com/vaadin/client/widgets/Grid.java | 6 |
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 9f82d3339f..76fe46fbb7 100755 --- a/client/src/main/java/com/vaadin/client/widgets/Grid.java +++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java @@ -7958,7 +7958,11 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, if (!event.getCell().isHeader()) { return; } - if (event.getCell().getColumnIndex() < getFrozenColumnCount()) { + int offset = 0; // apply offset depending on selection column, see #10546 + if (getSelectionColumn().isPresent()) { + offset = -1; + } + if (event.getCell().getColumnIndex()+offset < getFrozenColumnCount()) { return; } |