FoldingActions (Deprecated)
FoldingActions (Deprecated)
|
|
Headless v1 has been deprecated. We recommend using the latest version of the Coveo Headless library. |
The folding action creators.
See Dispatch Actions.
Loader Function
loadFoldingActions
Loads the folding reducer and returns possible action creators.
Parameters
-
engine:
SearchEngineThe headless engine.
Returns FoldingActionCreators: The folding action creators.
FoldingActionCreators
loadCollection
Loads the results of a collection.
Parameters
-
collectionId:
stringThe collection id to load results for.
Returns AsyncThunkAction<LoadCollectionFulfilledReturn, string, AsyncThunkSearchOptions<StateNeededByLoadCollection>>: A dispatchable action.
registerFolding
Registers a folding configuration.
Parameters
-
payload:
RegisterFoldingActionCreatorPayloadThe action creator payload.
Returns PayloadAction<RegisterFoldingActionCreatorPayload>: A dispatchable action.
Related types
RegisterFoldingActionCreatorPayload
Properties
-
childField?:
stringThe name of the field that uniquely identifies a result within a collection.
Default:
foldingchild -
collectionField?:
stringThe name of the field on which to do the folding. The folded result list component will use the values of this field to resolve the collections of result items.
Default:
foldingcollection -
numberOfFoldedResults?:
numberThe number of child results to fold under the root collection element, before expansion.
Default:
2 -
parentField?:
stringThe name of the field that determines whether a certain result is a top result containing other child results within a collection.
Default:
foldingparent