angular / angular/components

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

Abierto
#32,670 5 comentarios 5 reacciones 0 asignados Ver en GitHub
area: cdk/table feature P3
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con el cdk-table-virtual-scroll-example de StackBlitz enlazado, actualízalo a Angular 21.1, ejecútalo y desplázate por las tablas para reproducir el problema. Rastrea el comportamiento de la tabla con virtual scroll usando varias definiciones de cdkRowDefWhen; se considera terminado cuando las filas reutilizadas muestran sus propiedades igual que sin virtual scroll.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, typescript
Área
frontend
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
55/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.