angular / angular/components

[cdk-virtual-scroll-viewport][mat-table] - sticky headers is not working properly when combining mat-table with cdk-virtual-scroll-viewport

Abierto
#18,240 3 comentarios 9 reacciones 0 asignados Ver en GitHub
area: cdk/scrolling P3
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

#### Reproduction

Use StackBlitz to reproduce your issue: https://stackblitz.com/fork/components-issue
https://stackblitz.com/edit/virtual-scroll-table-sticky-headers

Steps to reproduce:
1. wrap mat-table within a cdk-virtual-scroll-viewport element
2. add sticky: true property to *matHeaderRowDef directive as stated in documentation
3. observe sticky header slide down the viewport after about 10 rows.

#### Expected Behavior
Expect when adding the sticky:true; property to mat-table *matHeaderRowDef directive wrapped within a cdk-virtual-scroll-viewport that the headers remain positioned at the top of the viewport.

#### Actual Behavior
As you scroll the cdk-virtual-scroll-viewport slides the entire mat-table instead of just the row contents wrapped in the tbody element.

#### Environment

- Angular: >= 7
- CDK/Material: >= 7
- Browser(s): chrome, firefox, opera, safari
- Operating System (e.g. Windows, macOS, Ubuntu): all

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Reproduce the problem using the linked StackBlitz examples with mat-table wrapped in cdk-virtual-scroll-viewport and sticky set on matHeaderRowDef. Investigate the interaction between the virtual scroll viewport and table header positioning; done means the header remains at the top while the table contents scroll across the listed browsers.

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
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.