Skip to content

A search box that can be configured to allow autocompleting modifier lists

License

Notifications You must be signed in to change notification settings

cph/ember-search-with-modifiers

Repository files navigation

ember-search-with-modifiers

Build Status

A search box that can be configured to allow autocompleting modifier lists

Installation

ember install ember-search-with-modifiers

Usage

Example:
{{#search-with-modifiers
    query=query
    enter=(action "search")
    focusOnInput=(action "focusOnInput")
    sampleQueries=sampleQueries
    configHash=searchContext.config as |x|}}

  {{x.search-box
      focused=(mut searchFocused)
      onFocus=(action "showSearchHelpsOnFocus")
      onEscPressed=(action "hideSearchHelps")
      onDownPressed=(action "focusOnResults")
      placeholder=placeholder}}

  {{#if showSearchHelps}}
    {{x.modifier-list
        focused=(mut resultsFocused)
        focusOnInput=(action "focusOnInput")}}

  {{else if isSearching}}
    <div class="searching">{{t "search.message.searching"}}</div>
  {{else}}
    {{!-- search results --}}
  {{/if}}
{{/search-with-modifiers}}

License

This project is licensed under the MIT License.

About

A search box that can be configured to allow autocompleting modifier lists

Resources

License

Stars

Watchers

Forks

Packages

No packages published