Basically I have an observableArray and the values for each item are not an observable. This means when I change an item value the UI within a foreach loop of the observableArray does not update accordingly.
It means a massive change if I have to set them to observable, so is there a way I can refresh either the UI or observableArray foreach manually?
Yes, you can call valueHasMutated
function for your array:
yourArray.valueHasMutated();
EDIT: If first didn't help you can do 'dirty' refresh:
self.refresh = function(){ var data = self.array().slice(0); self.array([]); self.array(data); };
Here is working fiddle: http://jsfiddle.net/vyshniakov/FuEy6/2/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With