Skip to content

Commit

Permalink
Add wrapper around options and afterOptions component
Browse files Browse the repository at this point in the history
  • Loading branch information
nickschot committed Sep 12, 2018
1 parent 8227a47 commit f4660c6
Showing 1 changed file with 33 additions and 30 deletions.
63 changes: 33 additions & 30 deletions addon/templates/components/power-select.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -66,36 +66,39 @@
searchPlaceholder=(readonly searchPlaceholder)
select=(readonly publicAPI)
selectedItemComponent=(readonly selectedItemComponent)}}
{{#if mustShowSearchMessage}}
{{component searchMessageComponent
searchMessage=(readonly searchMessage)
select=(readonly publicAPI)
}}
{{else if mustShowNoMessages}}
{{#if (hasBlock "inverse")}}
{{yield to="inverse"}}
{{else if noMatchesMessage}}
<ul class="ember-power-select-options" role="listbox">
<li class="ember-power-select-option ember-power-select-option--no-matches-message" role="option">
{{noMatchesMessage}}
</li>
</ul>

<div class="ember-power-select-options-wrapper">
{{#if mustShowSearchMessage}}
{{component searchMessageComponent
searchMessage=(readonly searchMessage)
select=(readonly publicAPI)
}}
{{else if mustShowNoMessages}}
{{#if (hasBlock "inverse")}}
{{yield to="inverse"}}
{{else if noMatchesMessage}}
<ul class="ember-power-select-options" role="listbox">
<li class="ember-power-select-option ember-power-select-option--no-matches-message" role="option">
{{noMatchesMessage}}
</li>
</ul>
{{/if}}
{{else}}
{{#component optionsComponent
class="ember-power-select-options"
extra=(readonly extra)
groupIndex=""
loadingMessage=(readonly loadingMessage)
id=(readonly optionsId)
options=(readonly publicAPI.results)
optionsComponent=(readonly optionsComponent)
groupComponent=(readonly groupComponent)
select=(readonly publicAPI)
as |option term|}}
{{yield option term}}
{{/component}}
{{/if}}
{{else}}
{{#component optionsComponent
class="ember-power-select-options"
extra=(readonly extra)
groupIndex=""
loadingMessage=(readonly loadingMessage)
id=(readonly optionsId)
options=(readonly publicAPI.results)
optionsComponent=(readonly optionsComponent)
groupComponent=(readonly groupComponent)
select=(readonly publicAPI)
as |option term|}}
{{yield option term}}
{{/component}}
{{/if}}
{{component afterOptionsComponent select=(readonly publicAPI) extra=(readonly extra)}}
{{component afterOptionsComponent select=(readonly publicAPI) extra=(readonly extra)}}
</div>
{{/dropdown.content}}
{{/basic-dropdown}}

0 comments on commit f4660c6

Please sign in to comment.