2017-11-21 18:53:09 +08:00
|
|
|
import SelectKitHeaderComponent from "select-kit/components/select-kit/select-kit-header";
|
2020-08-29 03:30:20 +08:00
|
|
|
import layout from "select-kit/templates/components/multi-select/multi-select-header";
|
2021-08-23 16:44:19 +08:00
|
|
|
import { computed } from "@ember/object";
|
|
|
|
import { reads } from "@ember/object/computed";
|
2017-10-20 03:51:08 +08:00
|
|
|
|
2017-11-21 18:53:09 +08:00
|
|
|
export default SelectKitHeaderComponent.extend({
|
2021-08-23 16:44:19 +08:00
|
|
|
tagName: "summary",
|
2020-02-03 21:22:14 +08:00
|
|
|
classNames: ["multi-select-header"],
|
2020-08-29 03:30:20 +08:00
|
|
|
layout,
|
2017-10-20 03:51:08 +08:00
|
|
|
|
2021-08-23 16:44:19 +08:00
|
|
|
caretUpIcon: reads("selectKit.options.caretUpIcon"),
|
|
|
|
caretDownIcon: reads("selectKit.options.caretDownIcon"),
|
|
|
|
caretIcon: computed(
|
|
|
|
"selectKit.isExpanded",
|
|
|
|
"caretUpIcon",
|
|
|
|
"caretDownIcon",
|
|
|
|
function () {
|
|
|
|
return this.selectKit.isExpanded ? this.caretUpIcon : this.caretDownIcon;
|
2020-09-15 15:39:12 +08:00
|
|
|
}
|
2021-08-23 16:44:19 +08:00
|
|
|
),
|
2017-10-20 03:51:08 +08:00
|
|
|
});
|