angular / angular/components

bug(cdkTable): virtual scroll does not work for tables with cdkRowDefWhen

Ouverte
#32,670 5 commentaires 5 réactions 0 personnes assignées Voir sur GitHub
area: cdk/table feature P3
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

Virtual scroll does not work for tables with multiple cdkRow definitions. Properties remain undefined when a line from another definition is reused.

### Reproduction

StackBlitz link: [cdk-table-virtual-scroll-example](https://stackblitz.com/edit/pye7nuce?file=src%2Fexample%2Fcdk-table-virtual-scroll-example.html)
Steps to reproduce:
1. download and update the project to Angular 21.1 (sorry, I struggled with updating on StackBlitz)
2. run the project and scroll the tables down

### Expected Behavior

See the lines as if there were no virtual scroll.

### Actual Behavior

Rows that have reused a row of the other definition doesn't show their property. It is undefined.

### Environment

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez avec le cdk-table-virtual-scroll-example de StackBlitz lié, mettez-le à jour vers Angular 21.1, exécutez-le et faites défiler les tableaux pour reproduire le problème. Suivez le comportement du tableau avec virtual scroll en présence de plusieurs définitions cdkRowDefWhen ; le travail est terminé lorsque les lignes réutilisées affichent leurs propriétés exactement comme sans virtual scroll.

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é
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
55/100

Recevez les nouvelles issues par e-mail

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