Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(scrolling): virtual scroll not accounting for margin when measuri…
…ng range (#19852) Currently the `CdkVirtualForOf` determines the size of a rendered range by adding up the heights of all the elements, however this doesn't account for margins between them. These changes switch to doing it by taking the difference between the bottom of the last element and the top of the first. This should be a minor performance improvement as well, because we don't have to measure as many elements anymore. Fixes #19851.
- Loading branch information
Showing
2 changed files
with
45 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters