Skip to content

Commit 6391317

Browse files
committed
fix(checkbox): disabled property not being coerced
Fixes the `disabled` property not being coerced like all the other components. Fixes #13739.
1 parent 47de296 commit 6391317

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib/checkbox/checkbox.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,10 @@ export class MatCheckbox extends _MatCheckboxMixinBase implements ControlValueAc
245245
@Input()
246246
get disabled() { return this._disabled; }
247247
set disabled(value: any) {
248-
if (value != this.disabled) {
249-
this._disabled = value;
248+
const newValue = coerceBooleanProperty(value);
249+
250+
if (newValue != this.disabled) {
251+
this._disabled = newValue;
250252
this._changeDetectorRef.markForCheck();
251253
}
252254
}

0 commit comments

Comments
 (0)