You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mat-tab-group doesn't show styles for default tab selected #9540
There are three tabs:label1, label2 and label3. Inside each one of them there is another set of tabs. Now by default label1 shows the selected style as well as tab1 inside of it. Now once I click on another label like label 2 another set of tab loads but none of them shows tab label highlighted. Same goes for label3. I explicitly have to click on the tabs to see the styles.
What is the expected behavior?
Tab labels inside of label 2 and label 3 should also show highlighted tab labels.
I am also having this issue. Seems like when visibility is toggled, the styles aren't being applied. Ive tried using a .hide class instead of *ngIf, but that doesnt fix it either. Any current workarounds that anyone knows of?
Explanation: Tab content is eagerly loaded by default. The tabs use dom size/position calculations for animations, since the tabs are loaded when the content is not visible it causes this side effect. This can be resolved by lazy loading the tabs which is capable as of: #8921
Activity
[-]mat-tab-group doesn't show default tab [/-][+]mat-tab-group doesn't show styles for default tab selected[/+]MNorgren commentedon Feb 16, 2018
I am also having this issue. Seems like when visibility is toggled, the styles aren't being applied. Ive tried using a .hide class instead of *ngIf, but that doesnt fix it either. Any current workarounds that anyone knows of?
amcdnl commentedon Feb 18, 2018
Explanation: Tab content is eagerly loaded by default. The tabs use dom size/position calculations for animations, since the tabs are loaded when the content is not visible it causes this side effect. This can be resolved by lazy loading the tabs which is capable as of: #8921
angular-automatic-lock-bot commentedon Sep 8, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.