angular / angular/components

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

Đang mở
#26,237 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
area: material/table P3
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

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

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

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

Hướng nghiên cứu

Bắt đầu với bản tái hiện trên StackBlitz trong src/app/test-table.component.ts và xác minh cách các cập nhật dữ liệu động của mat-table được render. Theo dõi các đường đi của matHeaderCellDef và matFooterCellDef, sau đó xác nhận bản sửa bằng cách kiểm tra rằng các giá trị header và footer đã thay đổi được render lại cùng với nội dung của matCellDef.

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
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/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.