I want to override a third party module’s knockoutJS template (below) and want to pre-select the checkboxes based on my custom condition. Can anyone help me with code to how to do that?
And if somebody explain to me how this ko-checked=”$parent.value” works. Where I can find this “$parent.value” so I can see and play around with that based on my requirement. This looks like a part of UiComponent(vendormagentomodule-ui) but I am not able to find where & how this data ($parent.value) gets populated.
<each args="data: getOptions(), as: '$item'">
<input type="checkbox"
class="custom-input"
ko-checked="$parent.value"
attr="value: $item.index, id: $parent.uid + '_' + $item.index, name: $parent.name + '.customcharge'">
<label class="custom-label" attr="for: $parent.uid + '_' + $item.index">
<text args="$item.label"></text>
<text args="$parent.taxUtils.getPrice($data)"></text>
</label>