fix checkbox group value change handler
This commit is contained in:
parent
397dc8b903
commit
44b7e5796f
1 changed files with 4 additions and 3 deletions
|
@ -31,9 +31,10 @@ Ox.CheckboxGroup = function(options, self) {
|
|||
.update({
|
||||
value: function() {
|
||||
var value = Ox.clone(self.options.value);
|
||||
self.options.checkboxes.forEach(function(checkbox, index) {
|
||||
var checked = Ox.contains(value, checkbox.id);
|
||||
if (checked != checkbox.checked) {
|
||||
self.$checkboxes.forEach(function($checkbox, index) {
|
||||
var checked = Ox.contains(value, $checkbox.options('id'));
|
||||
if (checked != $checkbox.value()) {
|
||||
$checkbox.value(!$checkbox.value());
|
||||
toggleCheckbox(index);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue