I use mat-expansion-panel in my mat-select.
at first time I open mat-select
, It's ok. But when I click out of mat-select
to close mat-select
and click to mat-select
second time to reopen it, My mat-expansion-panel
is closed and i must to double to open it but not single click to reopen mat-expansion-panel
.
Can you help me? Thanks !
<mat-select multiple [formControl]="formControl">
<mat-expansion-panel *ngFor="let group of groups" [expanded]="true">
<mat-expansion-panel-header>
<mat-panel-title title="{{group.name}}">
<mat-checkbox (click)="toggleGroupParent($event, group.name, group.selected)" [(ngModel)]="group.selected" >
{{group.name}}
</mat-checkbox>
</mat-panel-title>
</mat-expansion-panel-header>
<ng-container *ngFor="let item of items">
<mat-option *ngIf="item.type == group.name" [value]="item" (click)="togglePerOneInType(group.name)" title="{{item.text}}">
{{item.text}}
</mat-option>
</ng-container>
</mat-expansion-panel>
</mat-select>