This might be a very trivial knowckout question, but I am just wondering if there is a better way for this case:
selectedItems.subscribe(changes => {
changes.forEach(change => {
if (change.status === 'added') {
}
})
},null, "arrayChange");
items().forEach(i=> i.isSelected(true));
where items is a observable array and selectedItems is a filtered array on the isSelected property. What I see is that the changes event is always only having 1 element, where I would expect there could be some performance to gain if it actually only broadcasted the change once with all the changes. I am thinking I might need to do something with the way I select all items but i tried with valueWIllMutate and valueHasMutated, but same results.
This might be a very trivial knowckout question, but I am just wondering if there is a better way for this case:
where items is a observable array and selectedItems is a filtered array on the isSelected property. What I see is that the changes event is always only having 1 element, where I would expect there could be some performance to gain if it actually only broadcasted the change once with all the changes. I am thinking I might need to do something with the way I select all items but i tried with valueWIllMutate and valueHasMutated, but same results.