Hi I am using TS visual embed SDK to
Hi, I am using TS visual embed SDK to display a visualization. The visualization contains table with rows and columns. I am aiming to add a click event on one of the column names. On click I need to access the row info and use it to navigate to other page within my application. Tried multiple solution from docs(ex: EmbedEvent.VizPointClick) and some other sources. Still getting errors. What is the right way to implement this?
import { LiveboardEmbed, EmbedEvent } from '@thoughtspot/visual-embed-sdk/react';
const handleVizPointClick = (data) => {
// Access the row information from the data object
const row = data.clickedPoint.selectedAttributes[0].value;
console.log('Clicked row:', row);
};
<LiveboardEmbed
// Other props
on={EmbedEvent.VizPointClick}
callback={handleVizPointClick}
/>
5 Replies
What's the error you are getting?
Type '
{
frameParams: { height: string; };
on: EmbedEvent;
callback: (data: any) => void; runtimeFilters: RuntimeFilter[];
visibleActions: undefined[];
liveboardId: string;
vizId: string;
}' is not assignable to type 'IntrinsicAttributes & LiveboardProps & RefAttributes<LiveboardEmbed>'.
Property 'on' does not exist on type 'IntrinsicAttributes & LiveboardProps & RefAttributes<LiveboardEmbed>'.ts(2322)
(property) on: EmbedEvent
@CallMeSam I hope the issue is already resolved
Yes it was resolved on the same day. https://discord.com/channels/1143209406037758065/1143209464875462756/1158844576119935088