Reputation: 163
I have an Angular Material tabs component. When I switch the Tab the Mat-expansion-panel are already open in the new Tab. So my click on the panel-header not work to refresh my Data. How can i close the expansion Panel when i switch the Tab?
<mat-tab label="Edelstahl">
<div class="tab-content visible-sm-12">
<mat-accordion>
<mat-expansion-panel [disabled]="true">
<mat-expansion-panel-header>
<div class="row_accordion disabled">
<div class="row">
<div class="col-4 col-sm-3 col-md-3 col-lg-5 col-xl-4">Typ</div>
<div class="col-4 col-sm-3 col-md-3 col-lg-2 col-xl-4 text-right">Euro / kg</div>
<div class="col-4 col-sm-5 col-md-5 col-lg-2 col-xl-2 offset-lg-1 text-right">Euro / m²</div>
</div>
</div>
</mat-expansion-panel-header>
</mat-expansion-panel>
<mat-expansion-panel>
<mat-expansion-panel-header (click)="getArticelTyp(4945)">
<div class="row_accordion">
<div class="row">
<div class="col-4 col-sm-3 col-md-3 col-lg-5 col-xl-4">12NE</div>
<div class="col-4 col-sm-3 col-md-3 col-lg-2 col-xl-4 text-right"> 9,10</div>
<div class="col-4 col-sm-5 col-md-5 col-lg-2 col-xl-2 offset-lg-1 text-right">89,29</div>
</div>
</div>
Thx
Upvotes: 1
Views: 2021
Reputation: 1998
This is a known issue in Angular Material 2. There's a pending fix as of 6.0.0-beta.0
.
Upvotes: 1