Skip to content

Commit

Permalink
Move disabled check to click event
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgroat committed Feb 2, 2017
1 parent 41ca5b3 commit 4cf92e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ export class Checkbox extends Ion implements IonicTapInput, AfterContentInit, Co
console.debug('checkbox, checked');
ev.preventDefault();
ev.stopPropagation();
this.onChange(!this._checked);
if (!this._disabled) {
this.onChange(!this._checked);
}
}

/**
Expand All @@ -158,7 +160,7 @@ export class Checkbox extends Ion implements IonicTapInput, AfterContentInit, Co
* @private
*/
_setChecked(isChecked: boolean) {
if (!this._disabled && isChecked !== this._checked) {
if (isChecked !== this._checked) {
this._checked = isChecked;
if (this._init) {
this.ionChange.emit(this);
Expand Down

0 comments on commit 4cf92e9

Please sign in to comment.