bug(cdkTable & mat-table): virtual scrolling shifting issues introduced in 21.1
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Calme
- Stack technique
- angular, typescript
- Domaine
- frontend
Piste de recherche
Commencez par comparer les exemples de tableaux StackBlitz de v21.0 et v21.1.1, en particulier le comportement de virtual-scroll et l’exemple DataSource. Dans la troisième reproduction, décommentez l’implémentation asynchrone dans table-virtual-scroll-example.component.ts et observez collectionViewer.onViewChange range.end pendant le défilement. C’est terminé lorsque mat-table et cdkTable défilent sans décalage et que le défilement infini ne récupère pas les pages à plusieurs reprises.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
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
21.0.0
Description
In version v20.0.0 we had used a custom virtual scrolling strategy to allow tables with sticky headers. Upgrade to 21.0.0 broke the custom scrolling strategy implementation we have used so we decided to look for alternatives. Luckily, It seems that 21.0 also introduced support for tables with sticky header (or was introduced earlier, I am actually not sure which version added support), unfortunately, version 21.1 seems to introduce a bug which makes the scrolling shift around.
The bug can be seen in the example provided in the Table documentation as well. The documentation is still running on 21.0.0 but if you upgrade the example to 21.1.1, you can start seeing the buggy behavior when scrolling.
Scrolling seems to be fixed when itemSize is set to 0, however, in infinite scrolling implementations using DataSource that rely on collectionViewer.onViewChange range.end, it will continuously fetch the next page since range.end will always be the max value (3rd stackblitz link in the reproduction links has an async implementation mocked example that can be tested if uncommented in table-virtual-scroll-example.component.ts in constructor)
Example provided is on mat-table but cdkTable's behavior is the same if not worse
Reproduction
StackBlitz link:
v21.0 (original example on version 21.0): https://stackblitz.com/edit/dfp4dgn5?file=src%2Fexample%2Ftable-virtual-scroll-example.ts&startScript=start
v21.1.1 (original example but on version 21.1.1): https://stackblitz.com/edit/6wi4nsxd?file=src%2Fexample%2Ftable-virtual-scroll-example.ts&startScript=start
v21.1.1 with DataSource: https://stackblitz.com/edit/gt9emjwr?file=src%2Fexample%2Ftable-virtual-scroll-example.ts (much more noticeable in this example)
Steps to reproduce:
- Scroll around using the scroll wheel (also happens when you drag around the scrollbar thumb especially visible in tables with small amount of rows)
- 3rd link has an infinite scrolling implementation that can be tested if uncommented in
table-virtual-scroll-example.component.ts's constructor
Expected Behavior
The table should scroll correctly without shifting around
Actual Behavior
Scrolling shifts around, some cases making it impossible to even scroll back up once you go all the way down and some cases scrolls upwards when scrolling down
Environment
- Angular: 21.1.1
- CDK/Material: 21.1.1
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows & macOS
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.9k
- Merge moyen
- 2 j 7 h
- PR mergées (30 j)
- 83
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de angular/components
-
bug(mat-slider): on Firefox, slider thumb is not aligned with cursorPeut-être pris @Devyalamaddi l’a pris il y a 4 jours. Ouvertearea: material/slider P4
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
angular/components#34094 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug(material/sort): hover hint arrow on an unsorted header shows the active sort direction, not the resulting direction after click.Peut-être pris @abdul-karim-mia l’a pris il y a 2 jours. Ouvertearea: material/sort P3
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
angular/components#33933 ·
Les mainteneurs répondent en général sous 1 jour
-
bug(mat-date-picker): month shown twice in date pickerPeut-être pris @PreethiPantangi l’a pris il y a 54 jours. Ouvertearea: material/datepicker P4
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
angular/components#33763 · 2 commentaires · 3 réactions ·
Les mainteneurs répondent en général sous 1 jour
-
Bug in table.scss footer cell height: unset instead of footer row height unsetPeut-être pris @minwookshin l’a pris il y a 41 jours. Ouvertearea: material/table P4
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
angular/components#33709 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug(date-adapter): Misleading JSDoc for createDate returns typePeut-être pris @BHUVANSH855 l’a pris il y a 171 jours. Ouvertearea: material/core P3
Difficulté 1/5 Moins d'une heure Accessibilité débutants 78/100
angular/components#33059 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de angular/components
Issues similaires
-
bug parity
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
WenyuChiou/agent-board#1489 ·
Les mainteneurs répondent en général sous 1 jour
-
area: bazaar bug complexity: medium
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
accensa/x402-facilitator-stellar#779 ·
Les mainteneurs répondent en général sous 1 jour
-
bug good first issue P4 size:S web-ui
Difficulté 2/5 Une demi-journée Accessibilité débutants 85/100
josephfung/curia#2600 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
cloudflare/partykit#444 ·