visibleActions: [Action.Save, Action.ShowUnderlyingData, Action.Download, Action.DownloadAsCsv, Action.Pin]
Customize menu elements
The Visual Embed SDK allows you to customize the menu actions for the ThoughtSpot components embedded in your app.
Overviewπ
Menu actions in ThoughtSpot UI are available as:
-
Primary buttons
Buttons that trigger an action for an entire page or a container. For example, the Save button in the Answer page. -
More (
β¦β) options -
Contextual menu that appears on right-clicking
When you embed a ThoughtSpot component in your app, these actions will be available to all users by default. However, your application users may not require all the menu actions, or you might want to restrict access to certain features.
Visual Embed SDK provides a set of attributes and action IDs to control the availability and appearance of actions:
-
visibleActionsarray
Defines a list of actions that are visible to your application users. UsevisibleActionswhen you want to show only a small subset of actions in the embedded view. -
disabledActionsarray
The actions specified in this array will appear as grayed-out and unavailable. You can also specify a reason for disabling the actions in thedisabledActionReasonattribute. For example, your application might need a specific privilege to schedule a Liveboard job. In this case, you may want to disable the Liveboard schedule action and display the message "Contact your administrator to enable this feature" on hover. -
hiddenActionsarray
Hides the actions in the embed view. If your embed requires most of the default actions, and you want to hide only a few, usehiddenActions. -
primaryActionattribute
Allows overriding the action assigned to a primary button in the visualization UI.
|
Important
|
|
Visible actionsπ
The Visual Embed SDK packages support the visibleActions attribute, which allows you to define an array of action IDs that correspond to the action in the UI element.
For example, to show only the Save, Show underlying data, Download as CSV, and Pin menu actions in the embedded UI, specify the action IDs in the visibleActions array:
If the visibleActions attribute is set as an empty array, no actions will appear in the embedded UI.
visibleActions: []
If the actions are in a nested menu, you must specify the action ID for parent element along with action ID. For example, to show only PDF option in the Download menu, specify the action ID for both:
visibleActions: [Action.Download, Action.DownloadAsPdf]
Nested menu behaviorπ
When you use visibleActions with actions that belong to a nested menu, the following rules apply:
-
Parent and child required β To show a specific child action, include both the parent action ID and the child action ID. If you include only the child without the parent, the child action does not appear because the parent container is hidden.
// Correct: show only the PDF option in the Download menu visibleActions: [Action.Download, Action.DownloadAsPdf] // Incorrect: DownloadAsPdf will NOT appear because its parent (Action.Download) is absent visibleActions: [Action.DownloadAsPdf] -
Parent without children β If you include a parent action without specifying any of its children, all default children of that parent appear.
// All children of the Download menu (PDF, CSV, XLSX, PNG) will appear visibleActions: [Action.Download]
Actions not supported in visibleActionsπ
The visibleActions array works as an allowlist for discrete menu actions and buttons. It does not control structural UI elements such as sidebars, banners, and panels. The following action IDs control structural UI surfaces and are supported only in hiddenActions (and where noted, disabledActions):
| Action ID | Controls | Supported in hiddenActions | Supported in visibleActions |
|---|---|---|---|
| All filter surfaces on a Liveboard (filter chips, parameter chips, cross-filter chips). Note: parameter and cross-filter chips are hide-only and do not support | β | β |
| The read-only data-access banner shown when a recipient opens a shared Spotter conversation. | β | β |
| The footer note in the Spotter share modal ("Chat will be shared up to the current moment"). | β | β |
| The title and toggle button in the Spotter past conversations sidebar. | β |