This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/templates/components/select-box.hbs
Joffrey JAFFEUX cad6107624 refactors select-box
Note: this commit also now uses select-box for mobile topics controls
2017-08-16 00:41:56 +02:00

42 lines
974 B
Handlebars

<input
class="select-box-offscreen"
type="text"
aria-haspopup="true"
role="button"
aria-labelledby="select-box-input-{{componentId}}"
/>
{{component selectBoxHeaderComponent
text=headerText
focused=focused
caretUpIcon=caretUpIcon
caretDownIcon=caretDownIcon
onToggle=(action "onToggle")
icon=icon
expanded=expanded
}}
<div class="select-box-body">
{{#if renderBody}}
{{#if filterable}}
{{component selectBoxFilterComponent
onFilterChange=(action "onFilterChange")
filterIcon=filterIcon
filterPlaceholder=filterPlaceholder
}}
{{/if}}
{{component selectBoxCollectionComponent
filteredContent=filteredContent
selectBoxRowComponent=selectBoxRowComponent
lastHoveredId=lastHoveredId
onSelectRow=(action "onSelectRow")
onHoverRow=(action "onHoverRow")
noContentText=noContentText
selectedId=value
}}
{{/if}}
</div>
<div class="select-box-wrapper"></div>