Skip to content

[Tabs] Interrupt / Intercept tab change #2013

@luchillo17

Description

@luchillo17

Bug, feature request, or proposal:

If possible, i want to intercept tab change, i know i have the MdTabChangeEvent through MdTabGroup's selectChange binding, but it only seems to show which tab is it transitioning to, how do i stop the transition of happening?

What is the expected behavior?

I want a way to call a function, make some logic in function and then if i want, stop the tab from happening, or even change to a different tab, my case is that the last tab should be a +, and on click it should add a new tab instead of transitioning to that empty tab.

What is the current behavior?

Can't find a way to intercept the transition of tabs.

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

Using tabs for a step based process, or just having a + tab made for the sole purpose of adding more tabs, not showing that tab.

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

material@2.0.0-alpha.10

Is there anything else we should know?

Idk if it exists or it lacks the feature itself, i guess that for the moment i'll need to let it transition to the empty tab, add the new tab and then transition to the created tab.

Metadata

Metadata

Assignees

Labels

P5The team acknowledges the request but does not plan to address it, it remains open for discussionarea: material/tabsfeatureThis issue represents a new feature or feature request rather than a bug or bug fixneeds: discussionFurther discussion with the team is needed before proceeding

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions