diff options
Diffstat (limited to 'client')
-rwxr-xr-x | client/src/main/java/com/vaadin/client/widgets/Grid.java | 8 |
1 files changed, 8 insertions, 0 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 ae63749c5f..4c88879ad1 100755 --- a/client/src/main/java/com/vaadin/client/widgets/Grid.java +++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java @@ -7220,6 +7220,14 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, } if (newSize > oldSize) { + if (oldSize == 0 && !isHeaderVisible()) { + // Fixes framework/issues/11607 + // Need to recalculate column widths when the + // first row is added to a non-header grid, + // otherwise the checkbox will be aligned in a + // wrong place. + recalculateColumnWidths(); + } body.insertRows(oldSize, newSize - oldSize); cellFocusHandler.rowsAddedToBody(Range .withLength(oldSize, newSize - oldSize)); |