DictionaryFieldContextActions (Search Engine) (Deprecated)

This is for:

Developer
Warning

Headless v1 has been deprecated. We recommend using the latest version of the Coveo Headless library.

The dictionary field context action creators.

Loader Function

loadDictionaryFieldContextActions

Loads the context reducer and returns possible action creators.

Parameters

  • engine: CoreEngine

    The headless engine.

Returns DictionaryFieldContextActionCreators: The dictionary field context action creators.

DictionaryFieldContextActionCreators

addContext

Adds a new dictionary field context field-key pair.

Parameters

Returns PayloadAction<AddDictionaryFieldContextActionCreatorPayload>: A dispatchable action.

removeContext

Removes a dictionary field context field-key pair.

Parameters

  • field: string

    The field to remove from the context (for example, "price").

Returns PayloadAction<string>: A dispatchable action.

setContext

Sets the dictionary field context.

Parameters

  • payload: Record<string, string>

    The action creator payload.

Returns PayloadAction<DictionaryFieldContextPayload>: A dispatchable action.

AddDictionaryFieldContextActionCreatorPayload

Properties

  • field: string

    The name of the dictionary field.

  • key: string

    The dictionary field key to return the value of.