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
mat-tab-header-pagination should only be displayed when the tabs cannot fit inside the container.
What is the current behavior?
the mat-tab-header-pagination arrows are being displayed even though there is enough space. When I click on a tab the tabs then resize and the arrows disappear..
Thats strange, still doesn't work for me.. I've attached two screenshots below. the first is how it loads for me - incorrectly, with the arrows. Then once I click on a tab the arrows disappear and it resizes and displays correctly..
Looks like you are overriding styles somewhere - the padding in your screenshots don't match what is shown in the plunker example. Please re-open with the included styles that you are using so we can fully reproduce
@julianobrasil is that the correct functionality? Thats similar to what i'm getting and it doesn't seem right to me.. How do I get the tabs to fill the width of their container (without overflowing horizontally)?
@michaelb-01, I'm a little bit confused... what do you mean by "container"? You set up a .form-container class to be just 250px width. With this so tiny width, the paging arrows are unavoidable, even if you use the currently undocument feature mentioned by @andrewseguin. But the pagination will disapear if you get rid of width: 250px in app.component.css (considering that the form-container can fulfill all the available plunk space):
I know 250px is fairly small but i'm using this for (a relatively thin) sidenav and I only have 3 tabs (which are icons) so they should be able to fit..
I see there's a minimum width of 160px on the tabs and 24px of padding on the left and right, is this necessary if you're using flex? Wouldn't it be more flexible to remove this and let flex do the work?
Which is fine but it would be nice if there was a 'dense' attribute so you can use tabs in small elements like sidenavs. Like I said before, is the min-width necessary? Can't it be set lower flex set to 1?
Activity
julianobrasil commentedon Dec 10, 2017
The example plunk you've posted seems to be working fine over here. Am I missing something in your description?
michaelb-01 commentedon Dec 10, 2017
Thats strange, still doesn't work for me.. I've attached two screenshots below. the first is how it loads for me - incorrectly, with the arrows. Then once I click on a tab the arrows disappear and it resizes and displays correctly..
julianobrasil commentedon Dec 10, 2017
I tested it in a Windows 10 + Chrome.
andrewseguin commentedon Dec 11, 2017
Looks like you are overriding styles somewhere - the padding in your screenshots don't match what is shown in the plunker example. Please re-open with the included styles that you are using so we can fully reproduce
michaelb-01 commentedon Dec 11, 2017
@julianobrasil is that the correct functionality? Thats similar to what i'm getting and it doesn't seem right to me.. How do I get the tabs to fill the width of their container (without overflowing horizontally)?
andrewseguin commentedon Dec 11, 2017
It's actually supported with a built-in attribute but it is undocumented.
On the
<mat-tab-group>element, apply themat-stretch-tabsattribute and the labels will stretch to fill the container.Example:
http://plnkr.co/edit/Y8KwgieJYQs5UR2pwc5j?p=preview
julianobrasil commentedon Dec 12, 2017
@michaelb-01, I'm a little bit confused... what do you mean by "container"? You set up a
.form-containerclass to be just 250px width. With this so tiny width, the paging arrows are unavoidable, even if you use the currently undocument feature mentioned by @andrewseguin. But the pagination will disapear if you get rid ofwidth: 250pxinapp.component.css(considering that theform-containercan fulfill all the available plunk space):michaelb-01 commentedon Dec 12, 2017
I know 250px is fairly small but i'm using this for (a relatively thin) sidenav and I only have 3 tabs (which are icons) so they should be able to fit..
I see there's a minimum width of 160px on the tabs and 24px of padding on the left and right, is this necessary if you're using flex? Wouldn't it be more flexible to remove this and let flex do the work?
michaelb-01 commentedon May 2, 2018
I never received a good answer for this. My work around is just to override the styles:
Which is fine but it would be nice if there was a 'dense' attribute so you can use tabs in small elements like sidenavs. Like I said before, is the min-width necessary? Can't it be set lower flex set to 1?
tomson7777 commentedon Jun 25, 2018
any info? there is still this bug
Digital-Chen commentedon Jan 25, 2019
I am having the exact same issue in my solution. This is really strange.
YassineBouayedd commentedon Jun 18, 2019
I'm also searching for a solution for this issue.
jos1337 commentedon Jul 20, 2019
any info? happens here aswell
angular-automatic-lock-bot commentedon Sep 11, 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.