Tab (Insight Engine)
Tab (Insight Engine)
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:
() => void
A 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:
boolean
Indicates whether the current tab is selected.
Initialize
buildTab
Creates an insight Tab
controller instance.
Parameters
-
engine:
InsightEngine
The headless engine.
-
props:
TabProps
The configurable
Tab
properties.
Returns Tab
TabProps
The configurable Tab
properties.
Properties
-
options:
TabOptions
The options for the
Tab
controller. -
initialState?:
TabInitialState
The initial state that should be applied to this
Tab
controller.
TabOptions
The options for the Tab
controller.
Properties
-
expression:
string
A constant query expression or filter that the Tab should add to any outgoing query.
Example:
@objecttype==Message
-
id:
string
A 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:
boolean
Specifies 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