From 5deec671ffbefe7eb7388151e5009548179637a7 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Tue, 13 Mar 2018 13:55:44 +0200 Subject: Fix performance issue in Grid initial render with Footer (#10705) * Fix performance issue in Grid initial render with Footer --- .../main/java/com/vaadin/client/connectors/grid/GridConnector.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'client') 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 fca1feab25..491aa0d9d2 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 @@ -211,10 +211,9 @@ public class GridConnector extends AbstractListingConnector Grid grid = getWidget(); - // Remove default headers when initializing Grid widget - while (grid.getHeaderRowCount() > 0) { - grid.removeHeaderRow(0); - } + // Trigger early redraw of both grid static sections. + grid.setHeaderVisible(!grid.isHeaderVisible()); + grid.setFooterVisible(!grid.isFooterVisible()); registerRpc(GridClientRpc.class, new GridClientRpc() { -- cgit v1.2.3