2022-07-06 01:41:31 +08:00
|
|
|
{{#unless this.selectKit.isHidden}}
|
|
|
|
{{component
|
|
|
|
this.selectKit.options.headerComponent
|
|
|
|
tabindex=this.tabindex
|
|
|
|
value=this.value
|
|
|
|
selectedContent=this.selectedContent
|
|
|
|
selectKit=this.selectKit
|
|
|
|
id=(concat this.selectKit.uniqueID "-header")
|
2017-10-20 03:51:08 +08:00
|
|
|
}}
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
<SelectKit::SelectKitBody
|
|
|
|
@selectKit={{this.selectKit}}
|
|
|
|
@id={{concat this.selectKit.uniqueID "-body"}}
|
|
|
|
>
|
|
|
|
{{component
|
|
|
|
this.selectKit.options.filterComponent
|
|
|
|
selectKit=this.selectKit
|
|
|
|
id=(concat this.selectKit.uniqueID "-filter")
|
2021-08-23 16:44:19 +08:00
|
|
|
}}
|
2020-02-03 21:22:14 +08:00
|
|
|
|
2023-05-09 02:56:46 +08:00
|
|
|
{{#each this.collections as |collection|}}
|
|
|
|
{{component
|
|
|
|
(component-for-collection collection.identifier this.selectKit)
|
|
|
|
collection=collection
|
|
|
|
selectKit=this.selectKit
|
|
|
|
value=this.value
|
|
|
|
}}
|
|
|
|
{{/each}}
|
2021-08-23 16:44:19 +08:00
|
|
|
|
2023-05-09 02:56:46 +08:00
|
|
|
{{#if this.selectKit.filter}}
|
2024-03-19 19:25:25 +08:00
|
|
|
{{#if (and this.selectKit.hasNoContent (not this.selectKit.isLoading))}}
|
2023-05-09 02:56:46 +08:00
|
|
|
<span class="no-content" role="alert">
|
|
|
|
{{i18n "select_kit.no_content"}}
|
|
|
|
</span>
|
|
|
|
{{else}}
|
|
|
|
<span class="results-count" role="alert">
|
|
|
|
{{i18n "select_kit.results_count" count=this.mainCollection.length}}
|
|
|
|
</span>
|
2021-08-23 16:44:19 +08:00
|
|
|
{{/if}}
|
2020-03-09 20:44:34 +08:00
|
|
|
{{/if}}
|
2023-05-09 02:56:46 +08:00
|
|
|
|
2022-06-30 18:30:50 +08:00
|
|
|
</SelectKit::SelectKitBody>
|
2020-02-03 21:22:14 +08:00
|
|
|
{{/unless}}
|