|
53 | 53 | tabindex={{and (not @disabled) (or @tabindex "0")}} |
54 | 54 | ...attributes |
55 | 55 | > |
56 | | - {{#let |
57 | | - (if |
58 | | - @triggerComponent |
59 | | - (component (ensure-safe-component @triggerComponent)) |
| 56 | + {{#let |
| 57 | + (if |
| 58 | + @triggerComponent |
| 59 | + (component (ensure-safe-component @triggerComponent)) |
60 | 60 | (component 'power-select/trigger') |
61 | | - ) |
| 61 | + ) |
62 | 62 | as |Trigger|}} |
63 | 63 | <Trigger |
64 | 64 | @allowClear={{@allowClear}} |
|
75 | 75 | @onInput={{this.handleInput}} |
76 | 76 | @onKeydown={{this.handleKeydown}} |
77 | 77 | @placeholder={{@placeholder}} |
78 | | - @placeholderComponent={{if |
79 | | - @placeholderComponent |
80 | | - (ensure-safe-component @placeholderComponent) |
| 78 | + @placeholderComponent={{if |
| 79 | + @placeholderComponent |
| 80 | + (ensure-safe-component @placeholderComponent) |
81 | 81 | (component 'power-select/placeholder') |
82 | 82 | }} |
83 | 83 | @ariaActiveDescendant={{concat publicAPI.uniqueId "-" this.highlightedIndex}} |
|
90 | 90 | </dropdown.Trigger> |
91 | 91 | <dropdown.Content class="ember-power-select-dropdown{{if publicAPI.isActive " ember-power-select-dropdown--active"}} {{@dropdownClass}}"> |
92 | 92 | {{#if (not-eq @beforeOptionsComponent null)}} |
93 | | - {{#let |
94 | | - (if |
95 | | - @beforeOptionsComponent |
| 93 | + {{#let |
| 94 | + (if |
| 95 | + @beforeOptionsComponent |
96 | 96 | (component (ensure-safe-component @beforeOptionsComponent)) |
97 | 97 | (component 'power-select/before-options') |
98 | | - ) |
| 98 | + ) |
99 | 99 | as |BeforeOptions|}} |
100 | 100 | <BeforeOptions |
101 | 101 | @select={{publicAPI}} |
|
116 | 116 | /> |
117 | 117 | {{/let}} |
118 | 118 | {{/if}} |
119 | | - {{#if this.mustShowSearchMessage}} |
120 | | - {{#let |
121 | | - (if |
122 | | - @searchMessageComponent |
123 | | - (component (ensure-safe-component @searchMessageComponent)) |
124 | | - (component 'power-select/search-message') |
125 | | - ) |
126 | | - as |SearchMessage|}} |
127 | | - <SearchMessage |
128 | | - @searchMessage={{this.searchMessage}} |
129 | | - @select={{publicAPI}} |
130 | | - id={{listboxId}} |
131 | | - aria-label={{@ariaLabel}} |
132 | | - aria-labelledby={{@ariaLabelledBy}} |
133 | | - /> |
134 | | - {{/let}} |
135 | | - {{else if this.mustShowNoMessages}} |
136 | | - {{#let |
137 | | - (if |
138 | | - @noMatchesMessageComponent |
139 | | - (component (ensure-safe-component @noMatchesMessageComponent)) |
140 | | - (component 'power-select/no-matches-message') |
141 | | - ) |
142 | | - as |NoMatchesMessage|}} |
143 | | - <NoMatchesMessage |
144 | | - @noMatchesMessage={{this.noMatchesMessage}} |
145 | | - @select={{publicAPI}} |
146 | | - id={{listboxId}} |
147 | | - aria-label={{@ariaLabel}} |
148 | | - aria-labelledby={{@ariaLabelledBy}} |
149 | | - /> |
150 | | - {{/let}} |
151 | | - {{else}} |
152 | | - {{#let |
153 | | - (if |
154 | | - @optionsComponent |
155 | | - (component (ensure-safe-component @optionsComponent)) |
156 | | - (component 'power-select/options') |
157 | | - ) |
158 | | - (if |
159 | | - @groupComponent |
160 | | - (component (ensure-safe-component @groupComponent)) |
161 | | - (component 'power-select/power-select-group') |
162 | | - ) |
163 | | - as |Options Group|}} |
164 | | - <Options |
165 | | - @loadingMessage={{or @loadingMessage "Loading options..."}} |
166 | | - @select={{publicAPI}} |
167 | | - @options={{publicAPI.results}} |
168 | | - @groupIndex="" |
169 | | - @optionsComponent={{Options}} |
170 | | - @extra={{@extra}} |
171 | | - @highlightOnHover={{this.highlightOnHover}} |
172 | | - @groupComponent={{Group}} |
173 | | - id={{listboxId}} |
174 | | - class="ember-power-select-options" as |option select|> |
175 | | - {{yield option select}} |
176 | | - </Options> |
177 | | - {{/let}} |
178 | | - {{/if}} |
179 | | - |
180 | | - {{#if @afterOptionsComponent}} |
181 | | - {{#let (component (ensure-safe-component @afterOptionsComponent)) as |AfterOptions|}} |
182 | | - <AfterOptions |
183 | | - @extra={{@extra}} |
184 | | - @select={{publicAPI}} |
185 | | - /> |
186 | | - {{/let}} |
187 | | - {{/if}} |
| 119 | + <div class="ember-power-select-options-wrapper"> |
| 120 | + {{#if this.mustShowSearchMessage}} |
| 121 | + {{#let |
| 122 | + (if |
| 123 | + @searchMessageComponent |
| 124 | + (component (ensure-safe-component @searchMessageComponent)) |
| 125 | + (component 'power-select/search-message') |
| 126 | + ) |
| 127 | + as |SearchMessage|}} |
| 128 | + <SearchMessage |
| 129 | + @searchMessage={{this.searchMessage}} |
| 130 | + @select={{publicAPI}} |
| 131 | + id={{listboxId}} |
| 132 | + aria-label={{@ariaLabel}} |
| 133 | + aria-labelledby={{@ariaLabelledBy}} |
| 134 | + /> |
| 135 | + {{/let}} |
| 136 | + {{else if this.mustShowNoMessages}} |
| 137 | + {{#let |
| 138 | + (if |
| 139 | + @noMatchesMessageComponent |
| 140 | + (component (ensure-safe-component @noMatchesMessageComponent)) |
| 141 | + (component 'power-select/no-matches-message') |
| 142 | + ) |
| 143 | + as |NoMatchesMessage|}} |
| 144 | + <NoMatchesMessage |
| 145 | + @noMatchesMessage={{this.noMatchesMessage}} |
| 146 | + @select={{publicAPI}} |
| 147 | + id={{listboxId}} |
| 148 | + aria-label={{@ariaLabel}} |
| 149 | + aria-labelledby={{@ariaLabelledBy}} |
| 150 | + /> |
| 151 | + {{/let}} |
| 152 | + {{else}} |
| 153 | + {{#let |
| 154 | + (if |
| 155 | + @optionsComponent |
| 156 | + (component (ensure-safe-component @optionsComponent)) |
| 157 | + (component 'power-select/options') |
| 158 | + ) |
| 159 | + (if |
| 160 | + @groupComponent |
| 161 | + (component (ensure-safe-component @groupComponent)) |
| 162 | + (component 'power-select/power-select-group') |
| 163 | + ) |
| 164 | + as |Options Group|}} |
| 165 | + <Options |
| 166 | + @loadingMessage={{or @loadingMessage "Loading options..."}} |
| 167 | + @select={{publicAPI}} |
| 168 | + @options={{publicAPI.results}} |
| 169 | + @groupIndex="" |
| 170 | + @optionsComponent={{Options}} |
| 171 | + @extra={{@extra}} |
| 172 | + @highlightOnHover={{this.highlightOnHover}} |
| 173 | + @groupComponent={{Group}} |
| 174 | + id={{listboxId}} |
| 175 | + class="ember-power-select-options" as |option select|> |
| 176 | + {{yield option select}} |
| 177 | + </Options> |
| 178 | + {{/let}} |
| 179 | + {{/if}} |
| 180 | + |
| 181 | + {{#if @afterOptionsComponent}} |
| 182 | + {{#let (component (ensure-safe-component @afterOptionsComponent)) as |AfterOptions|}} |
| 183 | + <AfterOptions |
| 184 | + @extra={{@extra}} |
| 185 | + @select={{publicAPI}} |
| 186 | + /> |
| 187 | + {{/let}} |
| 188 | + {{/if}} |
| 189 | + </div> |
188 | 190 | </dropdown.Content> |
189 | 191 | {{/let}} |
190 | 192 | </BasicDropdown> |
|
0 commit comments