ais-clear-refinements
<ais-clear-refinements // Optional parameters :excluded-attributes="string[]" :included-attributes="string[]" :transform-items="function" :class-names="object" />
About this widget
The ais-clear-refinements
widget displays a button that lets the user clears every currently applied refinement.
Examples
1
<ais-clear-refinements />
Props
excluded-attributes
|
type: string[]
default: ["query"]
Optional
The attributes to exclude from the refinements to clear. In the example below, the attribute This can’t be used with |
||
Copy
|
|||
included-attributes
|
type: string[]
default: []
Optional
The attributes to include in the refinements to clear (all by default). In the example below, only the This can’t be used with |
||
Copy
|
|||
transform-items
|
type: function
default: items => items
Optional
Receives the items, and is called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, and remove or reorder them. |
||
Copy
|
|||
class-names
|
type: object
default: {}
Optional
The CSS classes to override.
|
||
Copy
|
Customize the UI
default
|
The slot to override the complete DOM output of the widget. Scope
|
||
Copy
|
|||
resetLabel
|
The slot to override the DOM output for the label of the reset button. |
||
Copy
|
HTML output
1
2
3
4
5
<div class="ais-ClearRefinements">
<button class="ais-ClearRefinements-button">
Clear refinements
</button>
</div>