FieldSuggestionsGenerator

This is for:

Developer
Important

The Headless commerce engine, controllers, and actions are in open beta and therefore under active development. Reach out to your Coveo team for support in adopting them.

Methods

subscribe

Adds a callback that’s invoked on state change.

Parameters

  • listener: () => void

    A callback that’s invoked on state change.

Returns Unsubscribe: A function to remove the listener.

Attributes

fieldSuggestions

The facet controllers created by the facet generator.

state

The state of the field suggestions generator.

Properties

  • displayName: string

    The facet display name.

  • facetId: string

    The facet ID.

  • field: string

    The facet field.

  • type: 'regular' | 'hierarchical'

    The facet type.

Initialize

buildFieldSuggestionsGenerator

Builds a field suggestions generator controller for a given commerce engine.

Parameters

  • engine: CommerceEngine

    The commerce engine.

Returns FieldSuggestionsGenerator

Unsubscribe

Call signatures

  • (): void;