discourse/app/assets/javascripts/select-kit/templates/components/select-kit.hbs
Joffrey JAFFEUX 3ec2024466
select-kit refactoring
* improve events naming/handling
* do not explicitly check for true/Fasle
* make sure header is re-computed on toggle
2018-01-11 09:39:51 +01:00

51 lines
1.6 KiB
Handlebars

{{component headerComponent
tabindex=tabindex
shouldDisplayFilter=shouldDisplayFilter
isFocused=isFocused
isExpanded=isExpanded
computedContent=headerComputedContent
deselect=(action "deselect")
toggle=(action "toggle")
filterComputedContent=(action "filterComputedContent")
clearSelection=(action "clearSelection")
options=headerComponentOptions
}}
<div class="select-kit-body">
{{component filterComponent
filter=filter
icon=filterIcon
shouldDisplayFilter=shouldDisplayFilter
placeholder=(i18n filterPlaceholder)
isFocused=isFocused
filterComputedContent=(action "filterComputedContent")
}}
{{#if renderedBodyOnce}}
{{component collectionComponent
collectionHeader=collectionHeader
hasSelection=hasSelection
noneRowComputedContent=noneRowComputedContent
createRowComputedContent=createRowComputedContent
filteredComputedContent=filteredComputedContent
rowComponent=rowComponent
noneRowComponent=noneRowComponent
createRowComponent=createRowComponent
templateForRow=templateForRow
templateForNoneRow=templateForNoneRow
templateForCreateRow=templateForCreateRow
clearSelection=(action "clearSelection")
select=(action "select")
highlight=(action "highlight")
create=(action "create")
noContentLabel=noContentLabel
highlightedValue=highlightedValue
computedValue=computedValue
shouldDisplayNoContentRow=shouldDisplayNoContentRow
rowComponentOptions=rowComponentOptions
}}
{{/if}}
</div>
<div class="select-kit-wrapper"></div>