Skip to content

Instantly share code, notes, and snippets.

@xcambar
Created January 18, 2017 18:06
Show Gist options
  • Save xcambar/6c494ec10e13e2030550050a1cce4d24 to your computer and use it in GitHub Desktop.
Save xcambar/6c494ec10e13e2030550050a1cce4d24 to your computer and use it in GitHub Desktop.
ember-one-way-controls radio bug
import Ember from 'ember';
export default Ember.Controller.extend({
myValue: '?',
actions: {
setToSomethingElse() {
this.set('myValue', 'something else');
}
}
});
Value: {{myValue}}
<br>
<label>
{{one-way-radio myValue option="yes" name="myValue" update=(action (mut myValue))}}
yes
</label>
<label>
{{one-way-radio myValue option="no" name="myValue" update=(action (mut myValue))}}
no
</label>
<label>
{{one-way-radio myValue option="maybe" name="myValue" update=(action 'setToSomethingElse')}}
maybe
</label>
{
"version": "0.10.7",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.10.0",
"ember-data": "2.10.0",
"ember-template-compiler": "2.10.0",
"ember-testing": "2.10.0"
},
"addons": {
"ember-one-way-controls": "2.0.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment