Recent Searches Facet Component

Overview

The Recent Searches Facet Component displays a list of the five most recent searches performed by a user.

Selector

The selector for this component is <hawksearch-recent-searches-facet>.

Data Model

The Facet data model is exposed to the Handlebars template:

For more information, see Search Models.

Event Binding Attributes

Attribute Name

Attribute Value

Attribute Name

Attribute Value

hawksearch-query

string

When an element with this attribute is clicked, the click will be tracked and a new search will be executed with that query.

Default Template

<div class="recent-searches-facet"> <ul class="recent-searches-facet__list"> {{#each values}} <li class="recent-searches-facet__list__item"> <a hawksearch-query="{{title}}" class="facet__value">{{title}}</a> </li> {{/each}} </ul> </div>