Sort

Import
import Sort from 'react-storefront/Sort'

Props

NameTypeDefaultDescription
onSelectfuncFunction.prototype

A function to call when a sort option is selected. The option and event are passed. The default behavior can be prevented by called preventDefault() on the passed in event.

modelobject

A instance of SearchResultsModelBase

queryParamstring'sort'

The query string parameter that should be updated when the sort is changed. The value will the code corresponding to the selected sortOption. Defaults to "sort".

variantenum : 'menu-items' |
'buttons'
'buttons'

Controls how sort options are displayed. Can be "menu-items" or "buttons". Defaults to "buttons"

CSS API

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

  • container
  • option