bug(cdk/scrolling): Append only mode together with FixedSizeVirtualScrollStrategy results in a jumping view #23577
Labels
area: cdk/scrolling
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Reproduction
See the example in the official material documentation
https://material.angular.io/cdk/scrolling/overview#cdk-virtual-scroll-append-only
Screen.Recording.2021-09-13.at.15.43.49.mov
Note: This effect becomes even more apparent when the rendering of an item is more expensive!
Expected Behavior
Virtual scrolling with
appendOnly
sets the correct position without jumping to the top.Actual Behavior
The virtual scroll using
appendOnly
jumps for a certain time to the top of the scrolling container. After this period of time, the correct scroll position is set.A possible solution
I was able to solve this issue by implementing a CustomScrollingStrategy that copy-pastes FixedSizeScrollingStrategy and adapts line 171.
I am missing the insights to be able to open a pull request fixing this issue respecting all different use cases of virtual scrolling with and without
appendOnly
. So I am open to any kind of help to fix this issue.Environment
The text was updated successfully, but these errors were encountered: