mirror of
https://github.com/discourse/discourse.git
synced 2024-12-24 00:13:44 +08:00
48193767bf
Automatically generated by `eslint --fix` to satisfy the updated configuration
21 lines
710 B
JavaScript
21 lines
710 B
JavaScript
import { computed } from "@ember/object";
|
|
import { and, reads } from "@ember/object/computed";
|
|
import SingleSelectHeaderComponent from "select-kit/components/select-kit/single-select-header";
|
|
|
|
export default SingleSelectHeaderComponent.extend({
|
|
classNames: ["combo-box-header"],
|
|
clearable: reads("selectKit.options.clearable"),
|
|
caretUpIcon: reads("selectKit.options.caretUpIcon"),
|
|
caretDownIcon: reads("selectKit.options.caretDownIcon"),
|
|
shouldDisplayClearableButton: and("clearable", "value"),
|
|
|
|
caretIcon: computed(
|
|
"selectKit.isExpanded",
|
|
"caretUpIcon",
|
|
"caretDownIcon",
|
|
function () {
|
|
return this.selectKit.isExpanded ? this.caretUpIcon : this.caretDownIcon;
|
|
}
|
|
),
|
|
});
|