baran_98284
10/14/2024, 4:30 PM@thoughtspot/visual-embed-sdk library. The code passes a few actions.
tsx
import { Action, LiveboardEmbed as LiveboardEmbedRef } from '@thoughtspot/visual-embed-sdk';
const LiveboardVisuals: React.FC<LiveboardProps> = ({
liveboardId,
visualId,
filterByOptions,
filterByParameters,
}) => {
const embedRef = useEmbedRef() as React.MutableRefObject<LiveboardEmbedRef>;
return (
<LiveboardEmbed
frameParams={{
height: '580px',
}}
fullHeight
ref={embedRef}
liveboardId={liveboardId}
runtimeFilters={filterByOptions}
runtimeParameters={filterByParameters} // <--
vizId={visualId}
/>
);
};
Aim:
When the developer passes filterByParameters, and the user views the liveboard, then the passed parameter's chip is hidden.
Issue:
From our understanding, hiding the chip is the default behaviour (mentioned here in the NOTE section ). However, we would like to unhide the parameter chip since the default value should be passed but then the user should be able to change the value. So, how can we unhide the parameter chip when passing a runtime parameter?shikharts_67242
10/14/2024, 6:30 PMbaran_98284
10/15/2024, 9:14 AMupdateFilters in the React library (i.e., @thoughtspot/visual-embed-sdk on v1.33.3 (latest version as of today)?
My attempt:
ts
<LiveboardEmbed
onLiveboardRendered={() =>
embedRef.current.trigger(HostEvent.UpdateParameters, [{ name: 'Timezones', value: 'Australia/Sydney' }])
} // when the liveboard is loaded, the parameter is not changed
ref={embedRef}
liveboardId={liveboardId}
// runtimeParameters={[{ name: 'Timezones', value: 'Australia/Sydney' }]} // when the liveboard is loaded, the parameter is changed, but the parameter chip is hidden; so I can't use this prop
vizId={visualId}
/>