discourse/app/assets/javascripts/select-box-kit/components/multi-combo-box/selected-name.js.es6

20 lines
588 B
Plaintext
Raw Normal View History

2017-11-10 02:57:53 +08:00
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;
}
});