MatTab: selectedTabChange should not fire when the tab is changed programmatically
There should be a way to differentiate between a UI and a programmaticcally induced tab change. As of now, both cause the selectedTabChange: EventEmitter
My case is pretty simple: I want to display the currently opened Tab in the URL:
somePage?openedTab=1 somePage?openedTab=2
But I also want the corresponding tab to open when a URL pointing to a specific tab is navigated to. Ideally, the [selectedIndex] input should not cause (selectedTabChange) to fire.
Does this make sense?
Material 8.2.3, Angular 8.2.11
Sounds like a reasonable feature request to me. Native elements (such as input) do not emit on programmatic changes either, so we should definitely match that.
https://stackblitz.com/edit/comp-17889?file=src/app/app.component.html
will this be fixed ? i think is a bug, not a feature request ... especially when an input binding (selectedIndex) change results in firing of both selectedTabChange and selectedIndexChange
https://stackblitz.com/edit/angular-mat-tab-group-outputs?file=src/app/tab-group-basic-example.ts
thanks 👍
Any news here?
Interested on an update on this one as well
This obvious flaw is still not fixed, any updates?
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.
Find more details about Angular's feature request process in our documentation.
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.