discourse/app/assets/javascripts/select-box-kit/components/multi-combo-box/selected-name.js.es6
2017-11-09 10:57:53 -08:00

20 lines
588 B
JavaScript

export default Ember.Component.extend({
attributeBindings: ["tabindex","content.name:data-name", "content.value:data-value"],
classNames: "selected-name",
classNameBindings: ["isHighlighted", "isLocked"],
layoutName: "select-box-kit/templates/components/multi-combo-box/selected-name",
tagName: "li",
tabindex: -1,
isLocked: Ember.computed("content.locked", function() {
return this.getWithDefault("content.locked", false);
}),
click() {
if (this.get("isLocked") === true) { return false; }
this.toggleProperty("isHighlighted");
return false;
}
});