mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(checkbox): disabled property not being coerced (#13755)
Fixes the `disabled` property not being coerced like all the other components. Fixes #13739.
This commit is contained in:
committed by
mmalerba
parent
b636cc09d6
commit
e5fe34cab1
@@ -245,8 +245,10 @@ export class MatCheckbox extends _MatCheckboxMixinBase implements ControlValueAc
|
||||
@Input()
|
||||
get disabled() { return this._disabled; }
|
||||
set disabled(value: any) {
|
||||
if (value != this.disabled) {
|
||||
this._disabled = value;
|
||||
const newValue = coerceBooleanProperty(value);
|
||||
|
||||
if (newValue !== this.disabled) {
|
||||
this._disabled = newValue;
|
||||
this._changeDetectorRef.markForCheck();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user