open-consul/ui-v2/app/templates/components/child-selector.hbs

21 lines
684 B
Handlebars
Raw Normal View History

{{yield}}
{{#yield-slot name='create'}}{{yield}}{{/yield-slot}}
<label class="type-text">
<span>{{#yield-slot name='label'}}{{yield}}{{/yield-slot}}</span>
{{#power-select
onopen=(action 'open')
search=(action 'search')
options=options
loadingMessage="Loading..."
searchMessage="No possible options"
searchPlaceholder=placeholder
onchange=(action 'change' 'items[]' items) as |item|
}}
{{#yield-slot name='option' params=(block-params item)}}{{yield}}{{/yield-slot}}
{{/power-select}}
</label>
{{#if (gt items.length 0)}}
{{#yield-slot name='set'}}{{yield}}{{/yield-slot}}
{{else}}
{{/if}}