Filter

Import
import Filter from 'react-storefront/Filter'

Props

NameTypeDefaultDescription
modelobject

An instance of SearchResultModelBase

classesobject

CSS classes

onViewResultsClickfuncFunction.prototype

A function to call when the user clicks the button to view updated results. The default behavior can be canceled by calling preventDefault on the passed in event. The event is passed as the only argument.

queryParamstring'filters'

The query string parameter that should be updated when filters are changed. The value will be an array of codes for each selected facet. Defaults to "filters"

titlestring

An optional title to display at the top of the component.

marginsbooltrue

Set to false to remove the default left and right margins. Defaults to true.

expandAllbool

Set to true to expand all groups on initial render

CSS API

You can override all the class names injected by Moov-PWA thanks to the classes property. This property accepts the following keys:

  • root
  • matches
  • footer
  • itemsFound
  • title
  • noMargins
  • groupLabel