angular / angular/components

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

未关闭 适合新手
#33,709 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area: material/table gemini-triaged P4
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
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

`// 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

贡献指南

打开贡献指南

调研方向

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.

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, scss
领域
frontend
Issue 类型
缺陷
难度
1/5
预计耗时
1 小时以内
活跃度
活跃
描述清晰度
描述清楚
新手友好度
88/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。