2020-12-01 15:45:09 +00:00
|
|
|
<PopoverMenu
|
|
|
|
class="popover-select"
|
|
|
|
...attributes
|
|
|
|
@position={{or position "left"}}
|
|
|
|
as |components menu|
|
|
|
|
>
|
2020-08-11 17:02:51 +00:00
|
|
|
{{yield}}
|
|
|
|
{{#let
|
|
|
|
(component 'popover-select/optgroup' components=components)
|
|
|
|
(component 'popover-select/option'
|
|
|
|
select=this components=components
|
2021-01-25 18:13:54 +00:00
|
|
|
onclick=(pipe
|
2020-08-11 17:02:51 +00:00
|
|
|
(action "click")
|
|
|
|
(if multiple (noop) menu.toggle)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
as |Optgroup Option|
|
|
|
|
}}
|
2020-05-11 14:04:27 +00:00
|
|
|
<BlockSlot @name="trigger">
|
2020-08-11 17:02:51 +00:00
|
|
|
<YieldSlot @name="selected">
|
|
|
|
{{yield (hash
|
|
|
|
Optgroup=Optgroup
|
|
|
|
Option=Option
|
|
|
|
)}}
|
|
|
|
</YieldSlot>
|
2020-05-11 14:04:27 +00:00
|
|
|
</BlockSlot>
|
2020-08-10 08:26:02 +00:00
|
|
|
<BlockSlot @name="menu">
|
2020-08-11 17:02:51 +00:00
|
|
|
<YieldSlot @name="options">
|
|
|
|
{{yield (hash
|
|
|
|
Optgroup=Optgroup
|
|
|
|
Option=Option
|
|
|
|
)}}
|
|
|
|
</YieldSlot>
|
2020-05-11 14:04:27 +00:00
|
|
|
</BlockSlot>
|
2020-08-11 17:02:51 +00:00
|
|
|
{{/let}}
|
2020-12-01 15:45:09 +00:00
|
|
|
</PopoverMenu>
|