Checkboxes are not updating when I foreach loop and bind a boolean to a checkbox.
function ViewModel() {
var self = this;
self.test = ko.observableArray([ false, false, false ]);
return self;
}
ko.applyBindings(new ViewModel());
<div data-bind="text: ko.toJSON(test)"></div>
<div data-bind="foreach: $root.test">
<input type="checkbox" data-bind="checked: $data" />
</div>
You can view the issue on jsfiddle: http://jsfiddle.net/KVWet/1/