diff options
author | Anna Koskinen <Ansku@users.noreply.github.com> | 2018-12-04 19:11:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-04 19:11:38 +0200 |
commit | e23c3dd83c372c86c1c2aa3b911bdcb0720c0095 (patch) | |
tree | 4881109a2696772a5a4553a78d7747ff63b3ce79 /client | |
parent | c9bd9a7ddbf90192d0a5610f3e188eacd2f493f3 (diff) | |
download | vaadin-framework-e23c3dd83c372c86c1c2aa3b911bdcb0720c0095.tar.gz vaadin-framework-e23c3dd83c372c86c1c2aa3b911bdcb0720c0095.zip |
Improvement to details row height handling. (#11351)
- When rows are added, details row heights need to be taken into account
in positioning.
Fixes #11348
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/widgets/Escalator.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/main/java/com/vaadin/client/widgets/Escalator.java b/client/src/main/java/com/vaadin/client/widgets/Escalator.java index ff76a66f96..cc207c10c0 100644 --- a/client/src/main/java/com/vaadin/client/widgets/Escalator.java +++ b/client/src/main/java/com/vaadin/client/widgets/Escalator.java @@ -2907,10 +2907,14 @@ public class Escalator extends Widget */ scroller.recalculateScrollbarsForVirtualViewport(); + double spacerHeightsSumUntilIndex = spacerContainer + .getSpacerHeightsSumUntilIndex(index); final boolean addedRowsAboveCurrentViewport = index - * getDefaultRowHeight() < getScrollTop(); + * getDefaultRowHeight() + + spacerHeightsSumUntilIndex < getScrollTop(); final boolean addedRowsBelowCurrentViewport = index - * getDefaultRowHeight() > getScrollTop() + * getDefaultRowHeight() + + spacerHeightsSumUntilIndex > getScrollTop() + getHeightOfSection(); if (addedRowsAboveCurrentViewport) { |