mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 03:06:53 +08:00
15 lines
341 B
JavaScript
15 lines
341 B
JavaScript
export default Ember.Component.extend({
|
|
tagName: "span",
|
|
selectionChanged: function() {
|
|
const selected = this.get("selected");
|
|
const list = this.get("selectedList");
|
|
const id = this.get("selectedId");
|
|
|
|
if (selected) {
|
|
list.addObject(id);
|
|
} else {
|
|
list.removeObject(id);
|
|
}
|
|
}.observes("selected")
|
|
});
|