mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Renamed gh-search-input-trigger
-> gh-power-select/input-trigger
refs https://github.com/TryGhost/Team/issues/973 - we have more uses for an input-based trigger for a power select component so the rename prepares the input-based trigger we use for the site search for more general usage - removed hardcoded search icon and class, they can be passed in as options via the `@extra` param
This commit is contained in:
parent
fd59421c7a
commit
4a24e0a089
3 changed files with 8 additions and 2 deletions
|
@ -1,5 +1,7 @@
|
||||||
<div class="ember-power-select-search" {{on "mousedown" this.captureMousedown}}>
|
<div class="ember-power-select-search" {{on "mousedown" this.captureMousedown}}>
|
||||||
{{svg-jar "search" class="gh-nav-search-icon"}}
|
{{#if @extra.inputIcon}}
|
||||||
|
{{svg-jar @extra.inputIcon class=@extra.inputIconClass}}
|
||||||
|
{{/if}}
|
||||||
<input type="search"
|
<input type="search"
|
||||||
{{autofocus}}
|
{{autofocus}}
|
||||||
{{did-insert this.registerInput}}
|
{{did-insert this.registerInput}}
|
|
@ -3,9 +3,13 @@
|
||||||
@onChange={{action "openSelected"}}
|
@onChange={{action "openSelected"}}
|
||||||
@placeholder="Search site..."
|
@placeholder="Search site..."
|
||||||
@searchEnabled={{false}}
|
@searchEnabled={{false}}
|
||||||
@triggerComponent="gh-search-input-trigger"
|
@triggerComponent="gh-power-select/input-trigger"
|
||||||
@renderInPlace={{true}}
|
@renderInPlace={{true}}
|
||||||
@loadingMessage="Loading"
|
@loadingMessage="Loading"
|
||||||
|
@extra={{hash
|
||||||
|
inputIcon="search"
|
||||||
|
inputIconClass="gh-nav-search-icon"
|
||||||
|
}}
|
||||||
as |name select|
|
as |name select|
|
||||||
>
|
>
|
||||||
{{highlighted-text name.title select.searchText}}
|
{{highlighted-text name.title select.searchText}}
|
||||||
|
|
Loading…
Add table
Reference in a new issue