2020-11-09 09:25:35 +00:00
|
|
|
<div
|
|
|
|
...attributes
|
|
|
|
>
|
2019-05-01 18:09:29 +00:00
|
|
|
{{yield}}
|
2020-02-19 19:26:38 +00:00
|
|
|
<YieldSlot @name="create">{{yield}}</YieldSlot>
|
2019-05-01 18:09:29 +00:00
|
|
|
<label class="type-text">
|
2020-02-19 19:26:38 +00:00
|
|
|
<span><YieldSlot @name="label">{{yield}}</YieldSlot></span>
|
2020-04-22 16:30:26 +00:00
|
|
|
{{#if isOpen}}
|
|
|
|
<DataSource
|
|
|
|
@src={{concat '/' (or nspace 'default') '/' dc '/' (pluralize type)}}
|
|
|
|
@onchange={{action (mut allOptions) value="data"}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
2020-02-21 16:48:54 +00:00
|
|
|
<PowerSelect
|
|
|
|
@search={{action "search"}}
|
|
|
|
@options={{options}}
|
|
|
|
@loadingMessage="Loading..."
|
|
|
|
@searchMessage="No possible options"
|
|
|
|
@searchPlaceholder={{placeholder}}
|
2020-04-22 16:30:26 +00:00
|
|
|
@onOpen={{action (mut isOpen) true}}
|
|
|
|
@onClose={{action (mut isOpen) false}}
|
2020-02-21 16:48:54 +00:00
|
|
|
@onChange={{action "change" "items[]" items}} as |item|>
|
2020-02-19 19:26:38 +00:00
|
|
|
<YieldSlot @name="option" @params={{block-params item}}>{{yield}}</YieldSlot>
|
|
|
|
</PowerSelect>
|
2019-05-01 18:09:29 +00:00
|
|
|
</label>
|
|
|
|
{{#if (gt items.length 0)}}
|
2020-02-19 19:26:38 +00:00
|
|
|
<YieldSlot @name="set">{{yield}}</YieldSlot>
|
2019-05-01 18:09:29 +00:00
|
|
|
{{else}}
|
|
|
|
|
2020-05-11 15:37:11 +00:00
|
|
|
{{/if}}
|
|
|
|
</div>
|