-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(checkbox): add options defaults config #17473
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
…tion. Follow-up PR will add the same default options to the MDC component. BREAKING CHANGE: MAT_CHECKBOX_CLICK_ACTION is deprecated, use MAT_CHECKBOX_DEFAULT_OPTIONS
ee2ce49
to
37b20e7
Compare
@@ -214,6 +231,9 @@ export class MatCheckbox extends _MatCheckboxMixinBase implements ControlValueAc | |||
}); | |||
} | |||
}); | |||
|
|||
// TODO: Remove this after the `_clickAction` parameter is removed as an injection parameter. | |||
this._clickAction = this._clickAction || this._options.clickAction; |
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.
Since clickAction
is deprecated, I think options.clickAction
should take precedence
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.
Discussed in person - I think the way it is captures the most common use cases, especially since the options object is provided in root and always defined, so it's not easy to tell if the user is switched to it
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
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. |
Adds injectable provider config to set the default color and click action.
Follow-up PR will add the same default options to the MDC component.
BREAKING CHANGES
MAT_CHECKBOX_CLICK_ACTION
is deprecated, useMAT_CHECKBOX_DEFAULT_OPTIONS