10fe22c9b4
* ui: Switch selects to use more HTML-like approach for optgroups * Add KV comparator * Use new option/optgroup approach for sort/select * Fix up tests for new order of menu items
32 lines
784 B
Handlebars
32 lines
784 B
Handlebars
{{yield}}
|
|
<form class={{concat 'filter-bar' (if (eq secondary 'sort') ' with-sort')}} ...attributes>
|
|
{{#yield-slot name="primary"}}
|
|
<fieldset>
|
|
{{yield}}
|
|
</fieldset>
|
|
{{else}}
|
|
<FreetextFilter
|
|
@onsearch={{action onsearch}}
|
|
@value={{value}}
|
|
@placeholder={{or placeholder 'Search'}}
|
|
/>
|
|
{{/yield-slot}}
|
|
{{#yield-slot name="secondary"}}
|
|
<fieldset>
|
|
{{yield}}
|
|
</fieldset>
|
|
{{else}}
|
|
{{#if options}}
|
|
{{#if (eq secondary 'sort')}}
|
|
{{else}}
|
|
<RadioGroup
|
|
@keyboardAccess={{true}}
|
|
@value={{selected.key}}
|
|
@items={{options}}
|
|
@onchange={{action onchange}}
|
|
/>
|
|
{{/if}}
|
|
{{/if}}
|
|
{{/yield-slot}}
|
|
</form>
|