FieldSuggestionsGenerator
FieldSuggestionsGenerator
This is for:
DeveloperIn this article
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
Related Types
Unsubscribe
Call signatures
-
(): void;