Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

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-selectorrecent-searches-here>.

Attributes

...

Attribute

...

Type

...

Default Value

...

Required

facet>.

Data Model

The Facet data model is exposed to the Handlebars template:

Insert excerpt
Search Models
Search Models
nameFacet
nopaneltrue

Info

For more information, see Search Models.

Event Binding Attributes

Events

Event Name

Data Type

Attribute Name

Attribute Value

Handlebars Helpers

...

Name

...

Parameter

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

Code Block
languagehtml
<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>