summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2019-08-29 16:06:25 +0300
committerGitHub <noreply@github.com>2019-08-29 16:06:25 +0300
commit6c190de82c22232cf9d59b807530b07822b0dfae (patch)
treecbb9f7c0ba75e3f80c5a3ea8c5dd4533aeb089cc /server
parentbcb5aada51b1f70fbf26355b039b4d4a6b3c2987 (diff)
downloadvaadin-framework-6c190de82c22232cf9d59b807530b07822b0dfae.tar.gz
vaadin-framework-6c190de82c22232cf9d59b807530b07822b0dfae.zip
Updated row and spacer handling for Escalator (#11438)
Updated row and spacer handling for Escalator. Main changes: - Spacers are only maintained and checked for rows that have DOM representation, and not at all if there is no details generator. This gives notable performance improvements to some particularly large Grids - Escalator no longer tries to trim away any rows that don't fit within the viewport just because a details row gets opened in Grid. This leads to some increase in simultaneous DOM elements, but simplifies the logic considerably. For example opening or closing details rows doesn't require checking the overall content validity beyond the details row itself anymore, but some repositioning at most. There are also no longer any orphaned spacers without corresponding DOM rows. - Spacers are better integrated into the overall position calculations. - Some public methods that are no longer used by Escalator or have changed functionality or order of operations. Any extending classes that tap into row, spacer, or scroll position handling are likely to need reworking after this update. - Auto-detecting row height is delayed until Escalator is both attached and displayed.
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/ui/Grid.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java
index fa6237a83a..104e90c3b9 100644
--- a/server/src/main/java/com/vaadin/ui/Grid.java
+++ b/server/src/main/java/com/vaadin/ui/Grid.java
@@ -737,6 +737,7 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents,
if (this.generator != generator) {
removeAllComponents();
}
+ getState().hasDetailsGenerator = generator != null;
this.generator = generator;
visibleDetails.forEach(this::refresh);
}