I have the following code:
<div class="flex-auto overflow-y-auto">
<mat-tab-group
[animationDuration]="'0'"
headerPosition="below"
mat-stretch-tabs="false"
>
<div cdkScrollable>
<!-- Tab #1 -->
<mat-tab label="List 1">
<!-- TAB CONTENT GOES HERE -->
<app-leads></app-leads>
</mat-tab>
<!-- Tab #2 -->
<mat-tab label="List 2">
<!-- TAB CONTENT GOES HERE -->
<inventory-list></inventory-list>
</mat-tab>
</div>
</mat-tab-group>
</div>
This produces the following:
The issue is whenever content within tabs moves up or down, the headers of tab group is not visible (not sticky).
How can it be resolved?
2
Answers
Use css sticky properties "position: sticky"
I now found the "issue". There is a lot of
overflow: hidden
onmat-tab-body-*
this will change all the overflow:
hidden
tovisible
inmat-tab-body