diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/connectors/grid/GridConnector.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/GridConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/GridConnector.java index 1c457ec4db..c7b759c7fb 100644 --- a/client/src/main/java/com/vaadin/client/connectors/grid/GridConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/grid/GridConnector.java @@ -328,6 +328,20 @@ public class GridConnector extends AbstractListingConnector }); } + @OnStateChange("rowHeight") + void updateRowHeight() { + double rowHeight = getState().rowHeight; + if (rowHeight >= 0) { + getWidget().getEscalator().getHeader() + .setDefaultRowHeight(rowHeight); + getWidget().getEscalator().getBody().setDefaultRowHeight(rowHeight); + getWidget().getEscalator().getFooter() + .setDefaultRowHeight(rowHeight); + } else if (getWidget().isAttached()) { + getWidget().resetSizesFromDom(); + } + } + private void updateStaticRow(RowState rowState, Grid.StaticSection.StaticRow row) { rowState.cells.forEach((columnId, cellState) -> { |