This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/track-selected.js.es6
2015-09-15 17:08:50 -04:00

15 lines
340 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')
});