I want to preselect the checkbox based on the data but checkbox are not getting preselected not sure why.
Below is the code.
Knockout
salesPerson: ko.observableArray([
{ itemName: 'Choice 1' ,checked:true },
{ itemName: 'Choice 2' ,checked:false}
]),
chosenSalesPersons: ko.observableArray()
HTML Code
<div class="chechbox-wrap" data-bind="foreach: salesPerson, event: { scroll: function(){} }">
<div data-bind="text: itemName"></div>
<label>
<input type="checkbox" data-bind="checkedValue: $data, checked: $parent.chosenSalesPersons" />
<span></span></label>
</div>