[ACS-6140] - search-tab-content does not show when changing tab multiple times (#9332)

This commit is contained in:
DominikIwanek
2024-02-13 11:37:44 +01:00
committed by GitHub
parent 8df2113ce8
commit 378b125993
2 changed files with 10 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
<mat-tab-group (selectedIndexChange)="onTabIndexChanged($event)">
<mat-tab *ngFor="let tabContent of tabsContents; let i = index"
[labelClass]='selectedIndex === i ? "adf-search-tab-label-active" : ""'
[bodyClass]='selectedIndex === i ? "adf-search-tab-content-active" : ""'
label="{{tabContent.name | translate}}">
<ng-container *ngTemplateOutlet="tabContent.templateRef"></ng-container>
</mat-tab>

View File

@@ -2,4 +2,13 @@ adf-search-filter-tabbed {
.adf-search-tab-label-active {
border-bottom: 2px solid var(--theme-primary-color);
}
// The important tag is used here as a workaround for a bug in angular material, when MatTabs are used in conjunction with MatMenu
// https://github.com/angular/components/issues/27426
.adf-search-tab-content-active {
& > div {
visibility: visible !important;
display: block !important;
}
}
}