Components: [Tabs] Prevent user from activating/deactivating tabs

Created on 28 Nov 2016  路  1Comment  路  Source: angular/components

Bug, feature request, or proposal:

Feature Request

What is the expected behavior?

Following a similar function to how canActivate and canDeactivate works on Routing, it would be extremely beneficial to have a way to run a check before allowing a tab to be activated or deactivated.

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

Within the tabs, if a user is able to change a setting or edit information and the user is required to click 'save' before the changes are committed, there should be a way to prompt the user of the existing changes before they can navigate away, by switching tabs or routes. The necessity here would be that we would need a way to check both on tab switch and route switch without (hopefully) having to duplicate code.

P5 materiatabs feature

Most helpful comment

Would be really nice to have.

>All comments

Would be really nice to have.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LoganDupont picture LoganDupont  路  3Comments

jelbourn picture jelbourn  路  3Comments

julianobrasil picture julianobrasil  路  3Comments

shlomiassaf picture shlomiassaf  路  3Comments

alanpurple picture alanpurple  路  3Comments