Skip to content

Commit

Permalink
fix(checkbox): disable for all non-false values (#1631)
Browse files Browse the repository at this point in the history
  • Loading branch information
dharmeshpipariya authored and jelbourn committed Oct 27, 2016
1 parent af39236 commit 80491a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,15 @@ export class MdCheckbox implements ControlValueAccessor {
/** Whether or not the checkbox should come before or after the label. */
@Input() align: 'start' | 'end' = 'start';

private _disabled: boolean;

/**
* Whether the checkbox is disabled. When the checkbox is disabled it cannot be interacted with.
* The correct ARIA attributes are applied to denote this to assistive technology.
*/
@Input() disabled: boolean = false;
@Input()
get disabled(): boolean { return this._disabled; }
set disabled(value) { this._disabled = coerceBooleanProperty(value); }

/**
* The tabindex attribute for the checkbox. Note that when the checkbox is disabled, the attribute
Expand Down

0 comments on commit 80491a9

Please sign in to comment.