Nigel1997
07/23/2026, 9:52 AMAnswer Overflow
07/23/2026, 9:52 AMspotter-code
07/23/2026, 9:53 AMprimaryAction and visibleActions do different things, and they are not interchangeable.
- primaryAction promotes an existing action to the primary button on Liveboard visualizations.
- visibleActions is an allowlist. If it is empty, no actions appear.
- For nested menus, you must include the parent action and the child action(s) in visibleActions.
So for download-related actions:
- Action.Download = the Download parent menu action
- Action.DownloadAsCsv, Action.DownloadAsXlsx, Action.DownloadAsPng, Action.DownloadAsPdf = child actions
That means these cases behave like this:
js
primaryAction: Action.Download,
visibleActions: [],
This will not work the way you want, because visibleActions: [] hides all actions.
js
primaryAction: Action.Download,
visibleActions: [
Action.Download,
Action.DownloadAsCsv,
Action.DownloadAsXlsx,
Action.DownloadAsPng,
],
This is the correct pattern if you want only download options visible. Action.Download must be present because it is the parent menu action.
Use:
js
import { init, LiveboardEmbed, AuthType, Action } from '@thoughtspot/visual-embed-sdk';
init({
thoughtSpotHost: 'https://your-instance.thoughtspot.cloud',
authType: AuthType.None,
});
const embed = new LiveboardEmbed('#ts-embed', {
liveboardId: '<LIVEBOARD_ID>',
primaryAction: Action.Download,
visibleActions: [
Action.Download,
Action.DownloadAsCsv,
Action.DownloadAsXlsx,
Action.DownloadAsPng,
],
});
embed.render();
Also, if you want only a specific nested download option, include both parent + child:
js
visibleActions: [Action.Download, Action.DownloadAsPdf]
Suggestions:
- If primaryAction: Action.Download still doesn’t show as expected, check whether that action is being blocked elsewhere by hiddenActions or disabledActions. The docs explicitly say the chosen primary action must not be hidden or disabled.spotter-code
07/23/2026, 9:53 AMAction.DownloadAsCsv
- Action.DownloadAsXlsx
- Action.DownloadAsPng
- primaryAction does not remove the default action entirely; it replaces the primary button, and the previous default action moves into the ... menu.
- If your goal is “download only, nothing else,” visibleActions should be your main control, with primaryAction just choosing which of those appears as the promoted button.
Docs:
- Action enum: https://developers.thoughtspot.com/docs/Enumeration_Action
- Action configuration / visibleActions: https://developers.thoughtspot.com/docs/action-config#_visible_actions
- Override default primary actions: https://developers.thoughtspot.com/docs/action-config#_override_default_primary_actions