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({
|
.update({
|
||||||
value: function() {
|
value: function() {
|
||||||
var value = Ox.clone(self.options.value);
|
var value = Ox.clone(self.options.value);
|
||||||
self.options.checkboxes.forEach(function(checkbox, index) {
|
self.$checkboxes.forEach(function($checkbox, index) {
|
||||||
var checked = Ox.contains(value, checkbox.id);
|
var checked = Ox.contains(value, $checkbox.options('id'));
|
||||||
if (checked != checkbox.checked) {
|
if (checked != $checkbox.value()) {
|
||||||
|
$checkbox.value(!$checkbox.value());
|
||||||
toggleCheckbox(index);
|
toggleCheckbox(index);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue