mirror of
https://github.com/discourse/discourse.git
synced 2024-12-15 18:53:40 +08:00
18 lines
403 B
JavaScript
18 lines
403 B
JavaScript
import { observes, on } from "ember-addons/ember-computed-decorators";
|
|
|
|
export default Ember.Component.extend({
|
|
tagName: "label",
|
|
|
|
click(e) {
|
|
e.preventDefault();
|
|
this.onChange(this.radioValue);
|
|
},
|
|
|
|
@observes("value")
|
|
@on("init")
|
|
updateVal() {
|
|
const checked = this.value === this.radioValue;
|
|
Ember.run.next(() => this.$("input[type=radio]").prop("checked", checked));
|
|
}
|
|
});
|