angular / angular/components

Bug in table.scss footer cell height: unset instead of footer row height unset

Đang mở Phù hợp với người mới
#33,709 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
area: material/table gemini-triaged 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

`// Flex rows should not set a definite height, but instead stretch to the height of their
// children. Otherwise, the cells grow larger than the row and the layout breaks.
.mat-mdc-table mat-header-row.mat-mdc-header-row,
.mat-mdc-table mat-row.mat-mdc-row,
.mat-mdc-table mat-footer-row.mat-mdc-footer-cell {
height: unset;
}`
https://github.com/angular/components/blob/main/src/material/table/table.scss#L158

Is `mat-mdc-footer-cell` intentional?
I feel it must be `mat-mdc-footer-row` not `cell

### Reproduction

StackBlitz link: https://stackblitz.com/edit/ydyoaqxm
Steps to reproduce:
1. npm run start
2. check 1 and 2 tables (wrong). check 3rd table fixed by tokens (okay)

### Expected Behavior

mat-mdc-footer-row height unset

### Actual Behavior

mat-mdc-footer-cell height unset

### Environment

- Angular: v18.2.4
- CDK/Material: v18.2.4
- Browser(s): 151.0.7922.172
- Operating System (e.g. Windows, macOS, Ubuntu): windows

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

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

Hướng nghiên cứu

Open src/material/table/table.scss around line 158 and compare the footer selector with the reported expected behavior. Run the linked StackBlitz reproduction or the listed npm run start steps, then verify that the footer row rather than a footer cell has an unset height and the affected tables no longer break.

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, scss
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
88/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.