discourse/app/assets/javascripts/select-kit/addon/components/multi-select/multi-select-header.hbs
Penar Musaraj f2048eeb4c
UX: Minor change to compact tag chooser (#22796)
Followup to f5e8e73.

This switches the placeholder label to the existing string "optional
tags" and only shows it if there are no items picked.

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2023-07-26 11:43:46 -04:00

33 lines
917 B
Handlebars

<div class="select-kit-header-wrapper">
{{#each this.icons as |icon|}}
{{d-icon icon}}
{{/each}}
{{#if this.selectKit.options.useHeaderFilter}}
<div class="select-kit-header--filter">
{{#if this.selectedContent.length}}
{{#each this.selectedContent as |item|}}
{{component
this.selectKit.options.selectedChoiceComponent
item=item
selectKit=this.selectKit
}}
{{/each}}
{{/if}}
{{component
this.selectKit.options.filterComponent
selectKit=this.selectKit
id=(concat this.selectKit.uniqueID "-filter")
hidePlaceholderWithSelection=true
}}
</div>
{{else}}
<MultiSelect::FormatSelectedContent
@content={{or this.selectedContent this.selectKit.noneItem}}
@selectKit={{this.selectKit}}
/>
{{d-icon this.caretIcon class="caret-icon"}}
{{/if}}
</div>