Skip to content

Commit 25b19c1

Browse files
committed
Fix disabled checkbox throw error when clicked
1 parent 436547a commit 25b19c1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/checkbox/checkbox.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ export class MdCheckbox implements ControlValueAccessor, AfterViewInit, OnDestro
142142
/** Whether the checkbox is disabled. */
143143
@Input()
144144
get disabled(): boolean { return this._disabled; }
145-
set disabled(value) { this._disabled = coerceBooleanProperty(value); }
145+
set disabled(value) {
146+
this._disabled = coerceBooleanProperty(value);
147+
this._changeDetectorRef.markForCheck();
148+
}
146149

147150
/** Tabindex value that is passed to the underlying input element. */
148151
@Input() tabIndex: number = 0;

0 commit comments

Comments
 (0)