SteveSanderson / knockout-es5

Knockout.js meets ECMAScript 5 properties
156 stars 39 forks source link

Cannot write to an observable received as param inside of component #62

Open herbertpimentel opened 7 years ago

herbertpimentel commented 7 years ago

KO components receives a reference of observable when we passes it as params. As componentes receives it as a reference you can write to this observable and it will reflect on your viewmodel; But, when you using ko-es5 plugin (super awesome) your KO component instead of receive also a reference to your observable receives some kind of computeObservable, and we cant write to it. is this a unexpected behaviour ? http://jsfiddle.net/kapuca/k0fw8w18/

http://jsfiddle.net/kapuca/jwea6zaL/

workaround: http://stackoverflow.com/questions/42427516/cannot-write-to-an-observable-received-as-param-inside-of-knockoutjs-component