bug(cdkTable): virtual scroll does not work for tables with cdkRowDefWhen
- 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
Virtual scroll does not work for tables with multiple cdkRow definitions. Properties remain undefined when a line from another definition is reused.
### Reproduction
StackBlitz link: [cdk-table-virtual-scroll-example](https://stackblitz.com/edit/pye7nuce?file=src%2Fexample%2Fcdk-table-virtual-scroll-example.html)
Steps to reproduce:
1. download and update the project to Angular 21.1 (sorry, I struggled with updating on StackBlitz)
2. run the project and scroll the tables down
### Expected Behavior
See the lines as if there were no virtual scroll.
### Actual Behavior
Rows that have reused a row of the other definition doesn't show their property. It is undefined.
### Environment
- Angular: 21.1.0
- CDK/Material: 21.1.0
- Browser(s):
- Operating System (e.g. Windows, macOS, Ubuntu):
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với cdk-table-virtual-scroll-example trên StackBlitz được liên kết, cập nhật nó lên Angular 21.1, chạy nó và cuộn các bảng để tái hiện vấn đề. Theo dõi hành vi của bảng virtual scroll với nhiều định nghĩa cdkRowDefWhen; hoàn thành khi các hàng được tái sử dụng hiển thị các thuộc tính của chúng giống như khi không dùng virtual scroll.
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 55/100