discourse/app/assets/javascripts/select-box-kit/templates/components/select-box-kit.hbs

61 lines
1.7 KiB
Handlebars

<input
class="select-box-kit-offscreen"
type="text"
aria-haspopup="true"
role="button"
aria-labelledby="select-box-kit-offscreen-{{elementId}}"
tabindex={{tabindex}}
name={{name}}
value={{computedValue}}
readonly=true
/>
{{component headerComponent
none=computedNone
isFocused=isFocused
isExpanded=isExpanded
selectedContent=selectedContent
onDeselect=(action "onDeselect")
onToggle=(action "onToggle")
onFilterChange=(action "onFilterChange")
onClearSelection=(action "onClearSelection")
shouldDisplayFilter=shouldDisplayFilter
options=headerComponentOptions
}}
<div class="select-box-kit-body">
{{component filterComponent
onFilterChange=(action "onFilterChange")
icon=filterIcon
shouldDisplayFilter=shouldDisplayFilter
isFocused=isFocused
placeholder=(i18n filterPlaceholder)
filter=filter
}}
{{#if renderedBodyOnce}}
{{component collectionComponent
none=computedNone
createRowContent=createRowContent
selectedContent=selectedContent
filteredContent=filteredContent
rowComponent=rowComponent
noneRowComponent=noneRowComponent
createRowComponent=createRowComponent
templateForRow=templateForRow
templateForNoneRow=templateForNoneRow
templateForCreateRow=templateForCreateRow
onClearSelection=(action "onClearSelection")
onSelect=(action "onSelect")
onHighlight=(action "onHighlight")
onCreateContent=(action "onCreateContent")
noContentLabel=noContentLabel
highlightedValue=highlightedValue
computedValue=computedValue
rowComponentOptions=rowComponentOptions
}}
{{/if}}
</div>
<div class="select-box-kit-wrapper"></div>