I have a view with a computed property that defines a set function which returns an object with some properties set. I've bound this to an <input> with the declaration value:myComputed.
The documentation of computeds describes that the return value of a computed's set is merged into the model when called.
I've confirmed the following
- Modifying properties the computed depends on updates the
<input>
- Calling
view.model.set('myComputed', '...') also updates the <input>
- The computed's
set does get called when I modify the <input>
What I expect to work, but doesn't
- Modifying the
<input> does not update the model
- Calling
view.setBinding('myComputed', '...') does not update the model
Looking at the source code I see the value I return from set gets as far as being returned from a call to accessor(self.get(self.$el, readAccessor(accessor), evt)) in the definition of EpoxyBinding, but nothing is done with it at that point.
My question
Am I misunderstanding the documentation here or is this a bug?
I have a view with a computed property that defines a
setfunction which returns an object with some properties set. I've bound this to an<input>with the declarationvalue:myComputed.The documentation of computeds describes that the return value of a computed's
setis merged into the model when called.I've confirmed the following
<input>view.model.set('myComputed', '...')also updates the<input>setdoes get called when I modify the<input>What I expect to work, but doesn't
<input>does not update the modelview.setBinding('myComputed', '...')does not update the modelLooking at the source code I see the value I return from
setgets as far as being returned from a call toaccessor(self.get(self.$el, readAccessor(accessor), evt))in the definition of EpoxyBinding, but nothing is done with it at that point.My question
Am I misunderstanding the documentation here or is this a bug?