Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Disable pagination on md-tabs #1189

Closed
lievenjanssen opened this issue Jan 14, 2015 · 7 comments
Closed

Disable pagination on md-tabs #1189

lievenjanssen opened this issue Jan 14, 2015 · 7 comments
Assignees
Milestone

Comments

@lievenjanssen
Copy link
Contributor

Is it possible to disable pagination on tabs?

I have small tabs that just show an icon and I want to display them next to eachother even if the screen width is small.

@robertmesserle
Copy link
Contributor

@lievenjanssen It sounds like you are looking to disable the tab-stretching, not pagination. Is this accurate?

@robertmesserle
Copy link
Contributor

I'll paste my (paraphrased) reply from the ngMaterial group:

You can disable stretching by adding the following attribute to your element: md-tab-stretching="never"

This is documented here: https://material.angularjs.org/#/api/material.components.tabs/directive/mdTabs

If you really do want to disable pagination, there is no current way to disable it; however, it should only occur when your content stretches beyond the available space within your tab bar. You could effectively disable it by expanding your tab-bar through CSS to fit its contents - otherwise, tabs would just be hidden and inaccessible.

@ThomasBurleson
Copy link
Contributor

Or you could use a separate Tabs (without content) data bound to external content using an ng-switch: Then large tab content areas will not affect the sizing of the tab buttons and container.

@see Static Tabs Demo.

@lievenjanssen
Copy link
Contributor Author

@robertmesserle setting md-stretch-tabs (documentation) or md-tab-stretching (your suggestion) to "never" doesn't work for me.

This is what I see:

Width large enough:
image

Width too small:
image

@ThomasBurleson I don't really understand what you mean.

@robertmesserle
Copy link
Contributor

Can you include a codepen or plunker for this example? I suspect that the issue could be a large amount of padding throwing off the pagination logic. If that's the case, it should be very easy to fix.

@lievenjanssen
Copy link
Contributor Author

Apparently version rc 7.0 fixes this issue. I plan to upgrade to this version once it's released so this issue can be closed.

@Bizarrus
Copy link

Im using v0.8.3-master-019a8d6 but i have the same problem:
i want to disable the "pagination/responsive" function - but how? Found nothing on Docs.

robertmesserle pushed a commit that referenced this issue Apr 1, 2015
JulianWielga pushed a commit to JulianWielga/material that referenced this issue Apr 1, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants