kendo-labs / knockout-kendo

A project to create a robust set of Knockout.js bindings for the Kendo UI widgets.
http://kendo-labs.github.com/knockout-kendo/
273 stars 144 forks source link

Knockout-Kendo.js does not update the control value when model is updated #82

Open AdamFronczakRoche opened 11 years ago

AdamFronczakRoche commented 11 years ago

Hello,

Knockout-Kendo.js does not update the control value when the model containing the bound property (not the property itself) is updated Using standard knockout binding supports that feature.

Example here: http://jsfiddle.net/g7dPw/12/

Click "Change Model" button. Note that Text Box is updated, but not the Date picker. Click "Print" to see that date on bound and on date picker are inconsistent.

Is this considered a bug or is it by design?

rniemeyer commented 11 years ago

This is a known issue/limitation. Any observables accessed in the binding string itself ( option: someObservable().something ) will not become dependencies based on the way the library is designed. Rather than using the update function of a binding, individual "live" properties use their own computed to isolate detecting changes and making updates. The downside to this is that currently any observables that are accessed while parsing the binding string itself will be lost.

When KO 3.0 is released, this will actually be addressed as bindings are now isolated and the dependencies are unwrapped when actually accessing them through the accessor functions.

Ander5800 commented 10 years ago

I have the Same Problem , As it can give you solution ?? I'm using KO3

Being inside the table does not update , but if it is outside of the table updates the value of the datepicker in the model