From 44b7e5796fa8452bb2c29a1ec750c9b9c698bff8 Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 31 Oct 2013 14:20:49 +0100 Subject: [PATCH] fix checkbox group value change handler --- source/Ox.UI/js/Form/CheckboxGroup.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/Ox.UI/js/Form/CheckboxGroup.js b/source/Ox.UI/js/Form/CheckboxGroup.js index c02ef494..140751a9 100644 --- a/source/Ox.UI/js/Form/CheckboxGroup.js +++ b/source/Ox.UI/js/Form/CheckboxGroup.js @@ -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); } });