I am currently facing an issue with my Angular CDK Virtual Scroll implementation. I have set up a mechanism to fetch data in batches as the user scrolls, with the intention of updating the virtual scroll content seamlessly. However, I've noticed that when the user scrolls too fast, the CDK Virtual Scroll does not promptly update its content.
I have confirmed that the data fetching is working correctly, but the virtual scroll doesn't seem to keep up with rapid scrolling. I would appreciate any insights or suggestions on how to address this issue and ensure that the CDK Virtual Scroll updates its content promptly, even during fast scrolling.
I've also created a simple algorithm to calculate the threshold based on the scroll speed. It still isn't rendering the batch consistently.
I have created a StackBlitz to demonstrate the issue: Stackblitz .
Steps to Reproduce: To observe the issue, click the button "scroll top" to fast scroll from the bottom to the top in the provided StackBlitz. The expecting result is that all messages are fetched and visible in the viewport. When all messages are fetched, it will be displayed under the button.
Thank you in advance for your assistance!