Skip to content

fix(tabs): hide mat-tab-nav-bar ink bar when no link is active #9701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

crisbeto
Copy link
Member

Currently the mat-tab-nav-bar updates the ink bar location whenever a link becomes active, however this doesn't account for the case where none of the links are active. These changes switch to checking for active links whenever the active state of any of the tabs changes and hiding the ink bar if none of them are active.

Fixes #9671.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 30, 2018
@josephjohansson
Copy link

Fixes #4436

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

/** Notifies the component that the active link has been changed. */
/**
* Notifies the component that the active link has been changed.
* @deletion-target 6.0.0 `element` parameter to be removed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7.0?

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release and removed pr: needs review labels Apr 9, 2018
Currently the `mat-tab-nav-bar` updates the ink bar location whenever a link becomes active, however this doesn't account for the case where none of the links are active. These changes switch to checking for active links whenever the active state of any of the tabs changes and hiding the ink bar if none of them are active.

Fixes angular#9671.
@crisbeto crisbeto force-pushed the 9671/tab-nav-bar-no-active-link branch from 0bce0f8 to eac10e2 Compare April 10, 2018 16:50
@tinayuangao tinayuangao merged commit 51206ee into angular:master Apr 11, 2018
crisbeto added a commit to crisbeto/material2 that referenced this pull request Apr 20, 2018
…rotected properties

In angular#9701 we made the `_activeLinkChanged` and `_activeLinkElement` properties private which makes them inaccessible when extending. These changes switch them to be protected.

Fixes angular#10939.
andrewseguin pushed a commit that referenced this pull request Apr 26, 2018
…rotected properties (#10940)

In #9701 we made the `_activeLinkChanged` and `_activeLinkElement` properties private which makes them inaccessible when extending. These changes switch them to be protected.

Fixes #10939.
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Tabs] mat-ink-bar doesn't update with the active state
6 participants