Search Field Component

Overview

The Search component contains a text input element which triggers the Autocomplete component as the user types and executes a new search when the user hits the enter key.

Selector

The selector for this component is <hawksearch-search-field>.

Data Model

The SearchResponse object is made available to the Handlebars template:

Event Binding Attributes

Attribute Name

Attribute Value

Attribute Name

Attribute Value

hawksearch-input

 

Input elements with this attribute will trigger Autocomplete functionality when the user types and executes a new search when the user hits the enter key.

Default Template

<div class="search-field"> <input type="text" hawksearch-input value="{{query}}" placeholder="Enter keywords" /> <hawksearch-autocomplete></hawksearch-autocomplete> </div>