angular / angular/components

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

Aperta
#26,384 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area: material/table P4
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

### 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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con la riproduzione StackBlitz collegata e il relativo punto di ingresso src/app/table-sticky-header-example.html. Riproduci in Chrome il trascinamento interrotto seguito dallo scorrimento, quindi traccia il comportamento della colonna sticky e del riordinamento della tabella. Il lavoro è completato quando il trascinamento interrotto non fa più sì che l'header selezionato perda il comportamento sticky.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular
Ambito
frontend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.