I have an Ember HBS template form with input and select fields. Input fields use a 'value' argument set to model.someField. When a user changes the input value, the model also gets changed and then shows there are changedAttributes staged.
I want to do this exact same thing with a select, but when I change the select value, the model.someField isnt getting updated automatically. What's the right way to do this?
I'm using Ember 2.9.
Credit to kumkanillam for this answer.
Adding onchange={{action (mut value) value="target.value"}} to the select fixed the auto update on the model.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With