Closed BurnedToast closed 10 years ago
Here is a simple jsFiddle showing my problem http://jsfiddle.net/jvwfmpya/6/
the sum is getting updated on "add" but not when changing the distance
This is a JsViews issue, not a JsRender issue. Could you re-create this issue on JsViews? I'll reply to the new issue once you have created. Thanks! (BTW see this related issue on JsViews https://github.com/BorisMoore/jsviews/issues/158, and this related discussion on StackOverflow: http://stackoverflow.com/questions/25721180/summary-value-calculation-with-jsviews).
here is the link for the reopened issue: https://github.com/BorisMoore/jsviews/issues/280
Hi,
I want to build a application similar to a driver's log. So the user can enter:
In my model there is a array "driverLog" with multiple objects containing these informations. The user can edit, remove or add data.
At the bottom of this table I want to have a summary of the distance. That summary has to update when the user adds or remove objects from the array or when the user changes the distance-property.
So I wrote a helper function:
This helper is getting called from my template like that:
It isworking for any changes to the driverLog (add / remove) itself, but if I just change the distance-value of any of these - the SUM wont get updated. I know the "depends" property for helpers - but I did not found any chance to return a path that makes the helper listening to the propertyChange-Events of the array-childs.
How can i manage this?