angular / angular/components

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

Ouverte
#26,384 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
area: material/table P4
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
91

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la reproduction StackBlitz liée et son point d’entrée src/app/table-sticky-header-example.html. Reproduisez dans Chrome le glissement abandonné suivi du défilement, puis suivez le comportement de la colonne sticky et du réordonnancement du tableau. C’est terminé lorsque le glissement abandonné ne provoque plus la perte du comportement sticky de l’en-tête sélectionné.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular
Domaine
frontend
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
42/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.