angular / angular/components

bug(mat-table): matFooterCellDef not showing updated value when changed

オープン
#26,237 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: material/table 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

When creating dynamic tables using mat-table and it's directives, I expect to pass data to the dynamic component and it to rerender everything based on data.

```html




{{ column.header }}


{{ column.cell(row) }}


{{ column.footer }}




```

### Reproduction

Reproduction: https://stackblitz.com/edit/angular-ivy-6urypw?file=src%2Fapp%2Ftest-table.component.ts

### Expected Behavior

I expect to see an updated table based on the data I pass to it, and not only stuff inside matCellDef, but also inside matFooterCellDef and matHeaderCellDef.

### Actual Behavior

Updating data for matCellDef works, but it doesn't re-render and update data inside matFooterCellDef and matHeaderCellDef.

### Environment

Angular v14 and v15

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

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

調査の方向性

src/app/test-table.component.ts の StackBlitz 再現コードから始め、動的な mat-table データの更新がどのようにレンダリングされるかを確認します。matHeaderCellDef と matFooterCellDef のパスを追跡し、変更されたヘッダー値とフッター値が matCellDef の内容とともに再レンダリングされることを確認して、修正を検証します。

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

評価

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

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

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