StandaloneSearchBoxSetActions (Commerce Engine)
StandaloneSearchBoxSetActions (Commerce Engine)
This is for:
DeveloperThe commerce standalone search box set action creators.
See Dispatch Actions.
Loader Function
loadStandaloneSearchBoxSetActions
Loads the standalone search box set reducer and returns the available commerce standalone search box set action creators.
Parameters
-
engine:
CommerceEngine
The headless commerce engine.
Returns StandaloneSearchBoxSetActionCreators
: The commerce standalone search box set action creators.
StandaloneSearchBoxSetActionCreators
fetchRedirectUrl
Preprocesses the query for the current headless state, and retrieves a redirection URL if a redirect trigger was fired in the query pipeline.
Parameters
-
payload:
FetchRedirectUrlPayload
The action creator payload.
Returns AsyncThunkAction<string, FetchRedirectUrlPayload, AsyncThunkCommerceOptions<StateNeededForRedirect>>
: A dispatchable action.
registerStandaloneSearchBox
Registers a standalone search box.
Parameters
-
payload:
RegisterStandaloneSearchBoxPayload
The action creator payload.
Returns PayloadAction<RegisterStandaloneSearchBoxPayload>
: A dispatchable action.
resetStandaloneSearchBox
Resets the standalone search box state. To be dispatched on single page applications after the redirection has been triggered.
Parameters
-
payload:
ResetStandaloneSearchBoxPayload
The action creator payload.
Returns PayloadAction<ResetStandaloneSearchBoxPayload>
: A dispatchable action.
Related Types
FetchRedirectUrlPayload
Properties
-
id:
string
The standalone search box id.
RegisterStandaloneSearchBoxPayload
Properties
-
id:
string
The standalone search box id.
-
redirectionUrl:
string
The default URL to which to redirect the user.
ResetStandaloneSearchBoxPayload
Properties
-
id:
string
The standalone search box id.