Skip to content

Commit

Permalink
fix(checkbox): disabled property not being coerced (#13755)
Browse files Browse the repository at this point in the history
Fixes the `disabled` property not being coerced like all the other components.

Fixes #13739.
  • Loading branch information
crisbeto authored and mmalerba committed Oct 26, 2018
1 parent 591e987 commit cee8c65
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit cee8c65

Please sign in to comment.