angular / angular/components

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

Ouverte
#15,775 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
area: material/table P2
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
91

Description

#### 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?

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la reproduction dans StackBlitz et comparez table.component.html et table.component.ts avant et après avoir placé la table dans mat-tab. Vérifiez la présence de MatTabsModule dans app.module.ts, puis reproduisez les lignes vides en changeant d’onglet. La tâche est terminée lorsque la table multiTemplateDataRows affiche correctement son contenu après avoir quitté le premier onglet et y être revenu.

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é
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
38/100

Recevez les nouvelles issues par e-mail

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