rniemeyer/knockout-classBindingProvider

view model doesn't update when textInput changes

mrkos67 opened this issue · 3 comments

fiddle: http://jsfiddle.net/6qvsth12/2/

as you can see, when making changes to the first input (the old data-bind attribute), textInput correctly updates the view model variable. updating the second input does not update the view model variable.

mbest commented

For a two-way binding, the binding handler needs to receive the observable, not just the value.

return {
    textInput: this.code
}

http://jsfiddle.net/6qvsth12/3/

those pesky parentheses. thanks!

thanks for jumping in @mbest 👍