0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/app/templates/components/gh-search-input.hbs
Kevin Ansfield 3fa48960f8 Don't show selectize dropdown when input field is blank
no issue
- modify behaviour of selectize's `openOnFocus` option by ensuring that the dropdown is not opened when the input field is blank
- fixes issue with dropdown opening when content is loaded async despite `openOnFocus=false`
- fixes issue with dropdown remaining open when user enters text then deletes it
2015-09-01 10:40:41 +01:00

14 lines
463 B
Handlebars

{{gh-selectize
placeholder="Search"
selection=selection
content=content
loading=isLoading
optionValuePath="content.id"
optionLabelPath="content.title"
optionGroupPath="content.category"
openOnFocus=false
maxItems="1"
on-focus="onFocus"
on-blur="onBlur"
select-item="openSelected"}}
<button class="gh-nav-search-button" {{action "focusInput"}}><i class="icon-search"></i><span class="sr-only">Search</span></button>