DocumentSuggestionList (Deprecated)
DocumentSuggestionList (Deprecated)
In this article
|
Headless v1 has been deprecated. We recommend using the latest version of the Coveo Headless library. |
The DocumentSuggestion
controller is responsible for getting document suggestions using case information present in the state.
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
state
A scoped and simplified part of the headless state that is relevant to the DocumentSuggestion
controller.
Properties
-
documents:
DocumentSuggestionResponse[]
The retrieved document suggestions.
-
error:
CaseAssistAPIErrorStatusResponse | null
The Case Assist API error response.
-
loading:
boolean
Whether document suggestions are being retrieved.
Was this article useful?
Thanks for your feedback!