1.13 input mut value observable/update

JSBin here

Why is the value bound by HTML input not updated? Where as with emer input helper value is updated and observer is fired. I thought using mut should do the trick.


1 Like

I could be wrong about this since I haven’t been keeping up to date for the last month but I don’t think angle bracket components are supported until 2.0.

Something like this will work. Input is just the DOM element, it’s not an ember component so it’s not calling set on the target value. If you really want to use the DOM’s Input then you need to bind an action to the oninput

Edit: updated with the correct jsbin URL

@jasonmit Thanks, that works. Although what i did was, extended Ember.TextField like

App.FpInputComponent = Ember.TextField.extend({
click: function(args){
    var clickAction = this.getAttr('inClick')
        this.sendAction('inClick', args);

and used like

    {{fp-input value=content  inClick='inputClicked'}}

and the observer fire fine when content is changed.

Any preference for either one?


I would use actions. They’re more explicit and easier to understand the flow and inline with data down, actions up versus mutating objects through the use of an observer pattern. Can easily find yourself in an entangled mess.