angular / angular/components

bug(MatTable): Vertical languages rotated and sticky columns

オープン
#30,542 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: material/table P4
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
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

18

### Description

When there are multiple sticky columns and a column has the `writing-mode: vertical-lr` CSS rule applied (and assuming it is not the _last_ sticky column), the table does not calculate the width of the column correctly. It uses the default `horizontal-tb` mode to calculate the width and uses that instead, causing subsequent sticky columns to overlap with non-sticky columns and creates a blank space between the column with the `vertical-lr` rule and the next sticky column.

### Reproduction

StackBlitz link: https://stackblitz.com/edit/components-issue-starter-6mfsadjh?file=src%2Fmain.ts,package.json
Steps to reproduce:
1. First two columns are sticky
2. One non-sticky column has `width: 100%` to force column compression

### Expected Behavior

The second column should have a `left` value that matches the width of the first column.

### Actual Behavior

The second column uses unrotated column width as its `left` value

![Image](https://github.com/user-attachments/assets/aeff30fd-dec3-4aa3-b40b-4fba4534d0a3)

### Environment

- Angular: 19
- CDK/Material: 19
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): MacOS

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

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

調査の方向性

リンクされた StackBlitz の再現から始め、最後ではない sticky 列が writing-mode: vertical-lr を使用する場合の最初の 2 つの sticky 列を比較します。2 列目の left の値を 1 列目のレンダリングされた幅と照合します。再現されたテーブルで、重なりや空白がなく値が一致すれば完了です。

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

評価

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

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

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