Widgets ClearRefinements

Description

The ClearRefinements widget displays a button that lets the user clean every refinement applied to the search.

Props

transformItems
type: function 

Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return.

clearsQuery
type: booleandefault: false

Pass true to also clear the search query

Example usage

import React from 'react'; import { InstantSearch, ClearRefinements, RefinementList } from 'react-instantsearch-dom'; const App = () => ( <InstantSearch appId="latency" apiKey="6be0576ff61c053d5f9a3225e2a90f76" indexName="instant_search" > <ClearRefinements /> <RefinementList attribute="brand" defaultRefinement={['Apple']} /> </InstantSearch> );

CSS classes

.ais-ClearRefinements {}

the root div of the widget

.ais-ClearRefinements-button {}

the clickable button

.ais-ClearRefinements-button--disabled {}

the disabled clickable button

Translation keys

reset

the clear all button value