aboutsummaryrefslogtreecommitdiffstats
path: root/compatibility-client
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2021-10-13 17:13:17 +0300
committerGitHub <noreply@github.com>2021-10-13 17:13:17 +0300
commit2cbaa342d34c0bee63a43ba51c21896e134dae87 (patch)
tree0447db387e6d0cae0e97dd3207de23779b188220 /compatibility-client
parent5a32cc87496f09a83a22b17def01089f0ba736f8 (diff)
downloadvaadin-framework-2cbaa342d34c0bee63a43ba51c21896e134dae87.tar.gz
vaadin-framework-2cbaa342d34c0bee63a43ba51c21896e134dae87.zip
Fix compatibility Grid column reorder of partially hidden joined cells. (#12427)
Adds the fix from #12386 to the drag source as well. Fixes #12377
Diffstat (limited to 'compatibility-client')
-rwxr-xr-xcompatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java
index efd50e3d1e..03556e3f79 100755
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java
@@ -4485,8 +4485,11 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
@Override
public void onDrop() {
final int draggedColumnIndex = eventCell.getColumnIndex();
- final int colspan = header.getRow(eventCell.getRowIndex())
- .getCell(eventCell.getColumn()).getColspan();
+ final StaticRow<?> draggedCellRow = header
+ .getRow(eventCell.getRowIndex());
+ Set<Column<?, ?>> cellGroup = draggedCellRow
+ .getCellGroupForColumn(getColumn(draggedColumnIndex));
+ final int colspan = cellGroup == null ? 1 : cellGroup.size();
if (latestColumnDropIndex != draggedColumnIndex
&& latestColumnDropIndex != draggedColumnIndex + colspan) {
List<Column<?, T>> columns = getColumns();