CoreFacetActions
CoreFacetActions
This is for:
DeveloperThe core facet action creators.
See Dispatch Actions.
Loader Function
loadCoreFacetActions
Loads the commerce facet set reducer and returns the available core facet action creators.
Parameters
-
engine:
CommerceEngine
The commerce engine.
Returns CoreFacetActionsCreators
: The core facet action creators.
CoreFacetActionsCreators
clearAllCoreFacets
Clears all facets.
Returns PayloadAction<void>
: A dispatchable action.
deselectAllValuesInCoreFacet
Deselects all values in a given facet.
Parameters
-
payload:
{ facetId: string; }
The action creator payload.
Returns PayloadAction<DeselectAllValuesInCoreFacetPayload>
: A dispatchable action.
updateAutoSelectionForAllCoreFacets
Updates the auto selection state of every facet.
Parameters
-
payload:
UpdateFacetAutoSelectionActionCreatorPayload
The action creator payload.
Returns PayloadAction<UpdateAutoSelectionForAllCoreFacetsPayload>
: A dispatchable action.
updateCoreFacetFreezeCurrentValues
Update the freeze current values state of a given facet.
Parameters
-
payload:
UpdateFreezeCurrentValuesActionCreatorPayload
The action creator payload.
Returns PayloadAction<UpdateCoreFacetFreezeCurrentValuesPayload>
: A dispatchable action.
updateCoreFacetIsFieldExpanded
Updates the expanded state of a given facet.
Parameters
-
payload:
UpdateFacetIsFieldExpandedActionCreatorPayload
The action creator payload.
Returns PayloadAction<UpdateCoreFacetIsFieldExpandedPayload>
: A dispatchable action.
updateCoreFacetNumberOfValues
Updates the number of values to request for a given facet.
Note: This action has no effect on category facets, which have their own action for this purpose.
Parameters
-
payload:
UpdateFacetNumberOfValuesActionCreatorPayload
The action creator payload.
Returns PayloadAction<UpdateCoreFacetNumberOfValuesPayload>
: A dispatchable action.