angular / angular/components

bug(cdkTable): virtual scroll does not work for tables with cdkRowDefWhen

オープン
#32,670 コメント 5 件 リアクション 5 件 担当者 0 名 GitHub で見る
area: cdk/table feature P3
主要言語
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

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):

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

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

調査の方向性

リンクされている StackBlitz の cdk-table-virtual-scroll-example から始め、Angular 21.1 に更新して実行し、テーブルをスクロールして問題を再現します。複数の cdkRowDefWhen 定義を使用した virtual scroll テーブルの動作を追跡します。再利用された行が、virtual scroll なしの場合と同じようにプロパティを表示すれば完了です。

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

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

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

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