[Tabs] Ink bar is not correctly aligned on init
See original GitHub issueBug, feature request, or proposal:
Bug (Some different than https://github.com/angular/material2/issues/3044)
What is the expected behavior?
Highlighter [md-ink-bar] should invalidate position on init app
What is the current behavior?
Misaligned [md-ink-bar]. Please see attached image.
What are the steps to reproduce?
Case 1
- Open demo application from material2
- Navigate to tabs (Especially for Tab Nav Bar with routing example)
- Apply md-stretch-tabs directive for <nav> and apply styles for tab items
[md-stretch-tabs] [md-tab-link] { flex-basis: 0; flex-grow: 1; }
- Try to expand / collapse application sidebar.
Case 2 (or just apply attached git patch. )
- Open demo application from material2
- Setup <md-sidenav mode=“side” opened=“true”> for root app container.
- Navigate to tabs (Especially for Tab Nav Bar with routing example)
- Apply md-stretch-tabs directive for <nav> and apply styles for tab items
[md-stretch-tabs] [md-tab-link] { flex-basis: 0; flex-grow: 1; }
- Select not first tab
- Refresh page
Providing a Plunker (or similar) is the best way to get the team to see your issue. Patch: MD_TabBar_issue.patch.zip
Which versions of Angular, Material, OS, browsers are affected?
Based on up to date sources of material2
Is there anything else we should know?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:11
Top Results From Across the Web
Ink bar under centered tabs not being aligned properly when ...
It seems that setting the sidenav's mode property to push fixes the problem. However, it changes how the components are displayed, ...
Read more >[Solved]-How to set the Angular material tab's mat-ink-bar to ...
[Solved]-How to set the Angular material tab's mat-ink-bar to take the width of tab ... Ink bar under centered tabs not being aligned...
Read more >Tabs - Angular Material
Material design tab-group component. Supports basic tab pairs (label + content) and includes animated ink-bar, keyboard navigation, and screen reader.
Read more >fix(material/tabs): ensure the ink bar realigns when the tab header ...
It uses ResizeObserver to ensure we get notifications about the dimensions of the tabs when they change. The layout change will fire synchronously....
Read more >Change Log - Ant Design
showSearch . #39531 @YinDongFang; Fix Tabs inkBar not show in StrictMode. ... #39517; Fix Modal hooks not pass ConfigProvider config correctly.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have this workarond
I also have ran into this issue. The mat-ink-bar does not recalculate when there is a material side nav with the mode set to “side”. Here is my work around with css (I am hiding the mat-ink-bar and using &:after styling):