Skip to content

Commit

Permalink
Mixed Checkbox Example: update individual checkbox states when master…
Browse files Browse the repository at this point in the history
… is mixed (pull #491)

Fix issue #486 by adding a procedure to update individual checkbox states when master is mixed.
  • Loading branch information
gerardkcohen authored and mcking65 committed Oct 27, 2017
1 parent 2fb83ec commit ca272bf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/checkbox/checkbox-2/js/checkboxMixed.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,17 @@ CheckboxMixed.prototype.updateCheckboxMixed = function () {
}
else {
this.domNode.setAttribute('aria-checked', 'mixed');
this.updateControlledStates();
}
}
};

CheckboxMixed.prototype.updateControlledStates = function () {
for (var i = 0; i < this.controlledCheckboxes.length; i++) {
this.controlledCheckboxes[i].lastState = this.controlledCheckboxes[i].isChecked();
}
};

CheckboxMixed.prototype.anyLastChecked = function () {

var count = 0;
Expand Down

0 comments on commit ca272bf

Please sign in to comment.