This component renders a history query suggestion combining two buttons: one for selecting this suggestion as the search query, and another one to remove this query suggestion from the history queries.
| ||The history query suggestion to render.|| |
(name - type - description)
| ||History Query content||suggestion |
| ||History Query remove button content||suggestion |
This component only requires a prop called
Customizing slots content
Suggestion and remove buttons contents can be customized.
The default slot allows you to replace the content of the suggestion button. It has two properties,
the suggestion itself, and a
string of HTML with the matched query.
The other slot is called
remove-button-content, and allows you to set the content of the button
that serves to remove this query from the history. This slot only has one property, the suggestion.
A list of events that the component will emit:
UserSelectedAHistoryQuery: the event is emitted after the user clicks the button. The event payload is the history query data.
Did you find this topic helpful?