In javascript how can you watch changes to a nested property or computed property on an observable object?
http://docs.kendoui.com/api/framework/observableobject#methods has observable.bind("change", function(e) { }); but this does not seem to update for nested properties/computed properties.
6 Answers, 1 is accepted
0
Hello Jonathan,
Atanas Korchev
the Telerik team
The change event should be raised for nested properties. Here is a live demo showing this in action: http://jsbin.com/iqukaz/1/edit
Regards,Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jonathan
Top achievements
Rank 1
answered on 31 Jul 2012, 08:31 PM
Thank you. I did not realize that it would work for nested properties. How do you suggest watching computed properties
http://jsbin.com/iqukaz/3/edit
http://jsbin.com/iqukaz/3/edit
0
Hello Jonathan,
Atanas Korchev
the Telerik team
Could you please elaborate a bit on your requirement? What exactly are you trying to achieve?
Regards,Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jonathan
Top achievements
Rank 1
answered on 08 Aug 2012, 10:35 PM
Since I can watch nested properties, updating computed properties is not a large issue.
Although I have noticed an issue when trying to bind to nested arrays. Is there any guidance on a situation such as http://jsbin.com/abigum/2/edit?
Although I have noticed an issue when trying to bind to nested arrays. Is there any guidance on a situation such as http://jsbin.com/abigum/2/edit?
0
Accepted
Hi Jonathan,
Atanas Korchev
the Telerik team
What seems to be the problem?
Regards,Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jonathan
Top achievements
Rank 1
answered on 09 Aug 2012, 10:29 PM
I must have been very tired when I posted those two questions. Kendo MVVM is working well!!
I have had issues with binding to the mobile checklist form with nested properties, but it is likely something I am doing wrong. Instead of binding, I am manually observing changes and it works well.'
Thanks for your patience.
I have had issues with binding to the mobile checklist form with nested properties, but it is likely something I am doing wrong. Instead of binding, I am manually observing changes and it works well.'
Thanks for your patience.