angular / angular/components

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

Đang mở
#24,208 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area: cdk/scrolling docs P4
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Tái hiện giới hạn trong ví dụ ngữ cảnh cuộn ảo của CDK được liên kết trong issue bằng cách thay đổi mảng thành 1.000.000 phần tử. Điều tra hành vi cuộn ảo của CDK quanh vị trí cuộn tối đa; được xem là hoàn tất khi viewport có thể đến cuối mảng thay vì dừng ở hàng 266304, và việc tái hiện đã được xác minh trên các trình duyệt được liệt kê.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.