Skip to content

Commit f4660c6

Browse files
committed
Add wrapper around options and afterOptions component
1 parent 8227a47 commit f4660c6

File tree

1 file changed

+33
-30
lines changed

1 file changed

+33
-30
lines changed

addon/templates/components/power-select.hbs

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -66,36 +66,39 @@
6666
searchPlaceholder=(readonly searchPlaceholder)
6767
select=(readonly publicAPI)
6868
selectedItemComponent=(readonly selectedItemComponent)}}
69-
{{#if mustShowSearchMessage}}
70-
{{component searchMessageComponent
71-
searchMessage=(readonly searchMessage)
72-
select=(readonly publicAPI)
73-
}}
74-
{{else if mustShowNoMessages}}
75-
{{#if (hasBlock "inverse")}}
76-
{{yield to="inverse"}}
77-
{{else if noMatchesMessage}}
78-
<ul class="ember-power-select-options" role="listbox">
79-
<li class="ember-power-select-option ember-power-select-option--no-matches-message" role="option">
80-
{{noMatchesMessage}}
81-
</li>
82-
</ul>
69+
70+
<div class="ember-power-select-options-wrapper">
71+
{{#if mustShowSearchMessage}}
72+
{{component searchMessageComponent
73+
searchMessage=(readonly searchMessage)
74+
select=(readonly publicAPI)
75+
}}
76+
{{else if mustShowNoMessages}}
77+
{{#if (hasBlock "inverse")}}
78+
{{yield to="inverse"}}
79+
{{else if noMatchesMessage}}
80+
<ul class="ember-power-select-options" role="listbox">
81+
<li class="ember-power-select-option ember-power-select-option--no-matches-message" role="option">
82+
{{noMatchesMessage}}
83+
</li>
84+
</ul>
85+
{{/if}}
86+
{{else}}
87+
{{#component optionsComponent
88+
class="ember-power-select-options"
89+
extra=(readonly extra)
90+
groupIndex=""
91+
loadingMessage=(readonly loadingMessage)
92+
id=(readonly optionsId)
93+
options=(readonly publicAPI.results)
94+
optionsComponent=(readonly optionsComponent)
95+
groupComponent=(readonly groupComponent)
96+
select=(readonly publicAPI)
97+
as |option term|}}
98+
{{yield option term}}
99+
{{/component}}
83100
{{/if}}
84-
{{else}}
85-
{{#component optionsComponent
86-
class="ember-power-select-options"
87-
extra=(readonly extra)
88-
groupIndex=""
89-
loadingMessage=(readonly loadingMessage)
90-
id=(readonly optionsId)
91-
options=(readonly publicAPI.results)
92-
optionsComponent=(readonly optionsComponent)
93-
groupComponent=(readonly groupComponent)
94-
select=(readonly publicAPI)
95-
as |option term|}}
96-
{{yield option term}}
97-
{{/component}}
98-
{{/if}}
99-
{{component afterOptionsComponent select=(readonly publicAPI) extra=(readonly extra)}}
101+
{{component afterOptionsComponent select=(readonly publicAPI) extra=(readonly extra)}}
102+
</div>
100103
{{/dropdown.content}}
101104
{{/basic-dropdown}}

0 commit comments

Comments
 (0)