ythomop
08/07/2025, 7:26 AMyindev_67585
08/07/2025, 9:58 AMythomop
08/07/2025, 11:41 AMHostEvent.UpdateFilters on LiveboardRendered but the liveboard filters don't update.
Can you a share a code snippet that does what you describe using the LiveboardEmbed component from @thoughtspot/visual-embed-sdk/react?ythomop
08/07/2025, 11:47 AMtsx
import React from "react";
import { LiveboardEmbed as LiveboardEmbedType, RuntimeFilterOp, HostEvent } from "@thoughtspot/visual-embed-sdk";
import { LiveboardFilter } from "@/thoughtspot/events";
import { LiveboardEmbed } from "@thoughtspot/visual-embed-sdk/react";
export type VizEmbedProps = {
liveboardFilters: LiveboardFilter[];
};
export function VizEmbed({ liveboardId, vizId }: { liveboardId: string; vizId: string }) {
const embedRef = React.useRef<LiveboardEmbedType>(null);
const runtimeFilters = React.useMemo(() => {
return [
{
columnName: "date",
operator: RuntimeFilterOp.BW_INC_MAX,
values: ["2025-08-01", "2025-08-02"],
type: "EXACT_DATE_RANGE",
},
];
}, []);
const onLiveboardRendered = React.useCallback(() => {
if (embedRef.current) {
const payload = {
filters: runtimeFilters,
};
embedRef.current.trigger(HostEvent.UpdateFilters, payload);
}
}, [runtimeFilters]);
return (
<LiveboardEmbed
ref={embedRef}
liveboardId={liveboardId}
vizId={vizId}
runtimeFilters={runtimeFilters}
onLiveboardRendered={onLiveboardRendered}
/>
);
}yindev_67585
08/07/2025, 12:12 PMythomop
08/07/2025, 12:30 PMshikharts_67242
08/07/2025, 8:03 PMythomop
08/08/2025, 8:08 AMthen and a catch callback and it seems that the request that triggers the event times-out with the error message being Error: Trigger timed-out in getting a response.yindev_67585
08/11/2025, 5:21 AMythomop
08/12/2025, 8:18 AMUpdateFilters or UpdateRuntimeFilters does not do anything.
I would like to schedule a call, but I'll be on leave until 21 August.
Can we schedule a call on the 22nd?
Thank youyindev_67585
08/12/2025, 9:23 AMyindev_67585
08/22/2025, 8:31 AMyindev_67585
08/22/2025, 8:43 AM