SearchActions (Commerce Engine)
SearchActions (Commerce Engine)
|
Note
This component was introduced in version |
The search action creators.
See Dispatch Actions.
SearchActionCreators
executeSearch
Executes a search query.
Returns AsyncThunkAction<QuerySearchCommerceAPIThunkReturn, void, AsyncThunkCommerceOptions<StateNeededByExecuteSearch>>
: A dispatchable action.
fetchMoreProducts
Fetches and additional page of products and appends it to the current list.
Returns AsyncThunkAction<QuerySearchCommerceAPIThunkReturn | null, void, AsyncThunkCommerceOptions<StateNeededByExecuteSearch>>
: A dispatchable action.
prepareForSearchWithQuery
Updates the query, resets the pagination, and optionally clears all facets in preparation for a new search query.
Parameters
-
payload:
UpdateQueryPayload & PrepareForSearchWithQueryOptions
The action creator payload.
Returns AsyncThunkAction<void, PrepareForSearchWithQueryPayload, AsyncThunkCommerceOptions<StateNeededByExecuteSearch>>
: A dispatchable action.
promoteChildToParent
Promotes a child product to a parent product.
Parameters
-
payload:
PromoteChildToParentPayload
The action creator payload.
Returns PayloadAction<PromoteChildToParentPayload>
: A dispatchable action.