angular / angular/components

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

Ouverte
#27,313 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
area: material/progress-bar 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?

- [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**

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la reproduction StackBlitz liée et confirmez le saut du sticky-header lors du défilement lorsque le tooltip ou la mat-progress-bar est présent. Examinez ensuite l’implémentation du sticky-header du tableau et les tests associés dans le Angular components repository. La tâche est terminée lorsque l’en-tête reste stable pendant le défilement alors qu’un autre élément positionné en absolu est présent.

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

Évaluation

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

Recevez les nouvelles issues par e-mail

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