Tab (Insight Engine) (Deprecated)
Tab (Insight Engine) (Deprecated)
|
|
Headless v1 has been deprecated. We recommend using the latest version of the Coveo Headless library. |
The Tab headless controller offers a high-level interface for designing a common tab UI controller.
Methods
select
Activates the tab.
subscribe
Adds a callback that’s invoked on state change.
Parameters
-
listener:
() => voidA callback that’s invoked on state change.
Returns Unsubscribe: A function to remove the listener.
Attributes
state
The state of the Tab controller.
Properties
-
isActive:
booleanIndicates whether the current tab is selected.
Initialize
buildTab
Creates an insight Tab controller instance.
Parameters
-
engine:
InsightEngineThe headless engine.
-
props:
TabPropsThe configurable
Tabproperties.
Returns Tab
TabProps
The configurable Tab properties.
Properties
-
options:
TabOptionsThe options for the
Tabcontroller. -
initialState?:
TabInitialStateThe initial state that should be applied to this
Tabcontroller.
TabOptions
The options for the Tab controller.
Properties
-
expression:
stringA constant query expression or filter that the Tab should add to any outgoing query.
Example:
@objecttype==Message -
id:
stringA unique identifier for the tab. The value will be used as the originLevel2 when the tab is active.
TabInitialState
The initial state that should be applied to this Tab controller.
Properties
-
isActive:
booleanSpecifies if the tab is currently selected. Note that there can be only one active tab for a given headless engine.
Related types
Unsubscribe
Call signatures
-
(): void