angular / angular/components

bug(mat-table): Re-orderable sticky columns become un-sticky if you start dragging, abort the drag, and then scroll

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

If you create a Material Design Table with **reorderable columns** that are also **sticky**, the column headers become un-sticky if you start to reorder a column, abort, and then scroll.

StackBlitz that reproduces the issue: https://stackblitz.com/edit/angular-kyaurw?file=src/app/table-sticky-header-example.html

### Reproduction

Steps to reproduce:
1. https://stackblitz.com/edit/angular-kyaurw?file=src/app/table-sticky-header-example.html
2. Click and hold a column header and start to drag it, but release the mouse button before dropping it in a new location
3. Scroll down
4. The column header is no longer sticky (see screenshot of the issue)
![unsticky_example](https://user-images.githubusercontent.com/1097608/211224588-af3abd24-95bd-4bbd-96c6-75d94e4bd297.png)

### Expected Behavior

If you abort a drag/drop, the column header should still be sticky like all of the other headers.

### Actual Behavior

If you abort a drag/drop, the column header you clicked is no longer sticky.

### Environment

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

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

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

調査の方向性

リンクされた StackBlitz の再現手順と、そのエントリポイントである src/app/table-sticky-header-example.html から始めます。Chrome でドラッグを中止した後にスクロールする操作を再現し、その後、テーブルの sticky 列と並べ替えの動作を追跡します。中止したドラッグによって選択したヘッダーが sticky でなくならなくなれば完了です。

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

評価

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

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

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