angular / angular/components

bug(table): Table with sticky header 'jumping'

オープン
#27,313 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: material/progress-bar 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

_No response_

### Description

When scrolling, a table with a sticky header "jumps" if you add an element that has a absolute position. For example, if you display the tooltip and scroll, then the sticky header will change position for a short time.
This is also true with the mat-progress-bar element.

### Reproduction

StackBlitz link:
Steps to reproduce:
1. Open [link](https://stackblitz.com/edit/gatzhq-oe6hfq?file=src%2Fexample%2Ftable-sticky-header-example.ts)
2. The sticky header changes the position on scroll when there is another element on the page with absolute position

https://github.com/angular/components/assets/16895663/bf5172c5-8cba-4a0b-b5da-89afab55d7ee

### Expected Behavior

The sticky header should not change position on scroll when there is another element on the page with an absolute position

### Actual Behavior

The sticky header changes the position on scroll when there is another element on the page with absolute position

### Environment

- Angular: v12, v15, v16
- CDK/Material: v12, v15, v16
- Browser(s): **Chrome Version 114.0.5735.110 (Official Build) (64-bit)**
- Operating System (e.g. Windows, macOS, Ubuntu): **Windows**

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

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

調査の方向性

リンクされている StackBlitz の再現手順から始め、tooltip または mat-progress-bar が存在する状態でスクロールしたときに sticky-header がジャンプすることを確認します。次に、Angular components repository にあるテーブルの sticky-header 実装と関連するテストを追跡します。別の絶対位置指定要素が存在する状態でスクロールしてもヘッダーが安定したままであれば完了です。

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

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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