angular / angular/components

Mat-table with multiTemplateDataRows is not working when this table is added in mat-tab.

Abierto
#15,775 0 comentarios 1 reacción 0 asignados Ver en GitHub
area: material/table P2
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

#### What is the expected behavior?
it should work fine with/without mat-tab

#### What is the current behavior?
Empty rows are created and displaying

#### What are the steps to reproduce?
Providing a StackBlitz reproduction is the *best* way to share your issue.

StackBlitz starter: https://goo.gl/wwnhMV

Step 1: Go to "https://stackblitz.com/edit/angular-material-expandable-table-rows?file=app%2Ftable%2Ftable.component.ts"

Step 2: Add Mat-tab module in app.module.ts "import {MatTabsModule} from '@angular/material/tabs';"

Step 3: Add the following code at the top, in table.componenet.html

"
Content 1
Content 2
Content 3
"

Step 4: Cut the rest of the code and paste it inside the tab replacing "Content 1"

Step 5: run the code.

Step 6: move to next tab and come back to first tab, the content will be displaying by default. PFA screenshots
![codechanges](https://user-images.githubusercontent.com/40624122/55858472-684e7780-5b8d-11e9-9b85-771dd0b99762.png)
![issue](https://user-images.githubusercontent.com/40624122/55858481-6edcef00-5b8d-11e9-8279-392a77220315.png)

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?

#### Is there anything else we should know?

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la reproducción en StackBlitz y compara table.component.html y table.component.ts antes y después de colocar la tabla dentro de mat-tab. Comprueba app.module.ts para verificar MatTabsModule y luego reproduce las filas vacías cambiando de pestaña. La tarea estará terminada cuando la tabla multiTemplateDataRows muestre su contenido correctamente después de salir de la primera pestaña y volver a ella.

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
Estancado
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.