-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(tabs): update tab output names #7134
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
Conversation
src/lib/tabs/tab-group.ts
Outdated
@Output() selectChange: EventEmitter<MdTabChangeEvent> = new EventEmitter<MdTabChangeEvent>(true); | ||
|
||
/** Event emitted when the tab selection has changed. */ | ||
@Output() selectedTabChange: EventEmitter<MdTabChangeEvent> = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than duplicating the creation of the EventEmitter and then having to call both, why not just have selectedTabChange
get the selectChange
value currently.
/**
* Event emitted when the tab selection has changed.
* @deprecated Use `selectedTabChange` instead.
*/
@Output() get selectChange(): EventEmitter<MdTabChangeEvent> {
return this.selectedTabChange;
}
/** Event emitted when the tab selection has changed. */
@Output() get selectedTabChange(): EventEmitter<MdTabChangeEvent> =
new EventEmitter<MdTabChangeEvent>(true);
Doing it this way, allows for users to move to the new output, and ultimately allows for the removal of the @Output
with minimal change to the code in the future as no change is needed below in the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion. Updated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@amcdnl your closing |
@mmalerba - done :) |
@andrewseguin - rebased. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Updates the tabs to the following new apis per #6677
selectChange
toselectedTabChange
onCentering
to_onCentering
onCentered
to_onCentered