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:
Kristiyan Kostadinov
2018-10-23 22:47:35 +02:00
committed by mmalerba
parent b636cc09d6
commit e5fe34cab1
+4 -2
View File
@@ -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();
}
}