angular / angular/components

bug(table/button): Z-index and scroll issues in a sticky table

未关闭
#27,246 2 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看
area: material/table P2 regression
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

### Is this a regression?

- [X] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

14

### Description

I have two bugs with a sticky mat-table and not with table with mat-table directive :

- The button's z-index has changed since version 15.0.0. The sticky and button column are both 1, which makes the button visible (but not the table background), a Workaround st z-index to 2 on sticky column.
- When I have several columns in a table with a fixed column, the fixed column also moves.

### Reproduction

StackBlitz link: https://stackblitz.com/edit/tu9ax3

### Expected Behavior

That anything that scrolls under the sticky column is not visible and the sticky column is real sticky.

### Actual Behavior

The button is above the sticky column, and the sticky column is not really sticky.

### Environment

- Angular: 15 - 16
- CDK/Material: 15 - 16
- Browser(s): Chrome Lastest version
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 11

贡献指南

打开贡献指南

调研方向

从链接的 StackBlitz 复现开始,比较其在 Angular/CDK/Material 14 和 15 中对于带有固定列和按钮列的 sticky mat-table 的行为。确认可滚动内容被隐藏在 sticky 列下方,固定列保持固定,并且按钮不再显示在其上方。

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

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

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