open-consul/ui-v2/app/templates/components/child-selector.hbs
John Cowen 6bf6002ab0
ui: Move slots to use attributes over positional params (#7032)
* Change all instances of yield/block-slots to use attributes over positional arguments

* Remove the ability to use yield/block-slots with positional params
2020-01-15 09:15:54 +00:00

21 lines
684 B
Handlebars

{{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}}