In documentation of Observable Array (
http://knockoutjs.com/documentation/observableArrays.html), it is mentioned that '
An observableArray tracks which objects are in the array, not the state of those objects'. In your case, you are changing the state of object inside the array (e.g the amount variable of object inside the array). Since there is no changes the size of Observable Array, re-computation of total is not triggered.
I have modified the code a little bit. I have changed 'amount' variable inside observableArray into an observable it self. This triggers the computation of 'weekTotal' any time you edit the amount. Check
http://jsfiddle.net/AjAHx/.
regards,
Nitin
BootStrapToday : The
Sensible Application Lifecycle
Management
http://www.bootstraptoday.com (Built with Knockoutjs)