mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 14:12:10 +08:00
24 lines
435 B
JavaScript
24 lines
435 B
JavaScript
export default Ember.Component.extend({
|
|
classNames: "select-box-header",
|
|
|
|
classNameBindings: ["focused:is-focused"],
|
|
|
|
didReceiveAttrs() {
|
|
this._super();
|
|
|
|
this._setCaretIcon();
|
|
},
|
|
|
|
click() {
|
|
this.sendAction("onToggle");
|
|
},
|
|
|
|
_setCaretIcon() {
|
|
if(this.get("expanded")) {
|
|
this.set("caretIcon", this.get("caretUpIcon"));
|
|
} else {
|
|
this.set("caretIcon", this.get("caretDownIcon"));
|
|
}
|
|
}
|
|
});
|