NumericFacetActions

This is for:

Developer

The numeric facet action creators.

Loader Function

loadNumericFacetActions

Loads the commerce facet set reducer and returns the available numeric facet action creators.

Parameters

  • engine: CommerceEngine

    The commerce engine.

Returns NumericFacetActionCreators: The numeric facet action creators.

NumericFacetActionCreators

toggleExcludeNumericFacetValue

Toggles the exclusion state of a given numeric facet value.

Parameters

  • payload: ToggleSelectNumericFacetValuePayload

    The action creator payload.

Returns PayloadAction<ToggleExcludeNumericFacetValuePayload>: A dispatchable action.

toggleSelectNumericFacetValue

Toggles the selection state of a given numeric facet value.

Parameters

Returns PayloadAction<ToggleSelectNumericFacetValuePayload>: A dispatchable action.

updateNumericFacetValues

Updates all values in a given numeric facet.

Parameters

Returns PayloadAction<UpdateNumericFacetValuesPayload>: A dispatchable action.

NumericRangeRequest

Properties

  • end: number

    The end value of the range.

  • endInclusive: boolean

    Whether to include the end value in the range.

  • start: number

    The start value of the range.

  • state: FacetValueState

    The current facet value state.

ToggleSelectNumericFacetValuePayload

Properties

  • facetId: string

    The unique identifier of the facet (e.g., "1").

  • selection: NumericRangeRequest

    The target numeric facet value.

UpdateNumericFacetValuesPayload

Properties

  • facetId: string

    The unique identifier of the facet (e.g., "1").

  • values: NumericRangeRequest[]

    The numeric facet values.