Skip to content

Navtabs dynamic width #4738

@mbeckenbach

Description

@mbeckenbach

Bug, feature request, or proposal:

Feature request

What is the expected behavior?

When the innerHtml of a tab link changes, the underline should refresh its witdh.

What is the current behavior?

You have for example these nav tab links:
Tab 1 | Tab 2 | Tab 3

Now change the label of 'Tab 1' to 'Bananarama' which is much longer than 'Tab 1'.
The active underline will stay at the width of 'Tab 1'.

Edit: When removing the nav-tabs component from dom and re-add after a few milliseconds the underline will be correct. Looks like it's only calculated onInit

What is the use-case or motivation for changing an existing behavior?

Dynamic tab labels

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

ng 4.1.x, md2 beta 5

Metadata

Metadata

Assignees

Labels

featureThis issue represents a new feature or feature request rather than a bug or bug fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions