From 4bdbf44b4f07b45961ad2734a3dd3ecac0789c4c Mon Sep 17 00:00:00 2001 From: crisbeto Date: Mon, 22 Oct 2018 22:23:45 +0200 Subject: [PATCH] fix(checkbox): disabled property not being coerced Fixes the `disabled` property not being coerced like all the other components. Fixes #13739. --- src/lib/checkbox/checkbox.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/checkbox/checkbox.ts b/src/lib/checkbox/checkbox.ts index 040e9bd9a93c..c30bc5a6ab79 100644 --- a/src/lib/checkbox/checkbox.ts +++ b/src/lib/checkbox/checkbox.ts @@ -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(); } }