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
Most helpful comment
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 馃憤