angular / angular/components

CdkVirtualScrollViewport will not scroll past 266304 rows, no matter how many rows are in the array

オープン
#24,208 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: cdk/scrolling docs P4
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

### 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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

issue にリンクされている CDK の仮想スクロールコンテキスト例で、配列を 1,000,000 個の要素に変更して上限を再現します。最大スクロール位置付近での CDK の仮想スクロールの動作を調査します。viewport が行 266304 で停止せずに配列の末尾まで到達でき、かつ再現が記載されたブラウザーで検証されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。