I'm trying to replace all of the contents of an item in an observableArray
with new content.
var oldLocation = ko.utils.arrayFirst(self.locations(), function (item) {
return item.id == value.id;
});
self.locations.replace(self.locations.indexOf(oldLocation), new location(value));
self.locations.valueHasMutated();
I've also tried
self.locations[self.locations.indexOf(location)] = new fizi.ko.models.location(value);
But nothing is working. The index is being properly retrieved but the update of the item isn't happening.