FoldingActions
FoldingActions
This is for:
DeveloperThe folding action creators.
See Dispatch Actions.
Loader Function
loadFoldingActions
Loads the folding
reducer and returns possible action creators.
Parameters
-
engine:
SearchEngine
The headless engine.
Returns FoldingActionCreators
: The folding action creators.
FoldingActionCreators
loadCollection
Loads the results of a collection.
Parameters
-
collectionId:
string
The collection id to load results for.
Returns AsyncThunkAction<LoadCollectionFulfilledReturn, string, AsyncThunkSearchOptions<StateNeededByLoadCollection>>
: A dispatchable action.
registerFolding
Registers a folding configuration.
Parameters
-
payload:
RegisterFoldingActionCreatorPayload
The action creator payload.
Returns PayloadAction<RegisterFoldingActionCreatorPayload>
: A dispatchable action.
Related Types
RegisterFoldingActionCreatorPayload
Properties
-
childField?:
string
The name of the field that uniquely identifies a result within a collection.
Default:
foldingchild
-
collectionField?:
string
The 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?:
number
The number of child results to fold under the root collection element, before expansion.
Default:
2
-
parentField?:
string
The name of the field that determines whether a certain result is a top result containing other child results within a collection.
Default:
foldingparent