CdkVirtualScrollViewport will not scroll past 266304 rows, no matter how many rows are in the array
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 91
Description
### Is this a regression?
- [ ] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
_No response_
### Description
Using the example project found at:
https://material.angular.io/cdk/scrolling/examples#cdk-virtual-scroll-context
If one increases the items array length to 1,000,000 elements, the virtual scroll viewport still renders and scrolls but will not scroll down past row number 266304.
`export class CdkVirtualScrollContextExample {
items = Array.from({length: 1000000}).map((_, i) => `Item #${i}`);
}`
This puts a hard cap on the size of dataset one can scroll through.
### Reproduction
Steps to reproduce:
1. Open in stackblitz the example found at https://material.angular.io/cdk/scrolling/examples#cdk-virtual-scroll-context
2. Increase the size of the array for the data feeding the example to 1,000,000 elements
3. Attempt to scroll to the bottom.
### Expected Behavior
Expect to see Item # 1,000,000 at the bottom area of the virtual scrolling area.
### Actual Behavior
I see item # 266,304 at the bottom of the scrolling area, with the scrollbar all the way at the bottom.
### Environment
- Angular: 13.0.0
- CDK/Material:13.1.2
- Browser(s): Brave, Safari
- Operating System (e.g. Windows, macOS, Ubuntu): macOS
Contributor guide
Research direction
Reproduce the limit in the CDK virtual scroll context example linked in the issue by changing the array to 1,000,000 items. Investigate the CDK virtual scrolling behavior around the maximum scroll position; done means the viewport can reach the end of the array instead of stopping at row 266304, with the reproduction verified in the listed browsers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100