`onParameterChanged` is not called after the user applies a parameter

Background: The React/JavaScript/TypeScript app runs a liveboard embed using the @thoughtspot/[email protected] library.:
import { Action, LiveboardEmbed as LiveboardEmbedRef } from '@thoughtspot/visual-embed-sdk';

const LiveboardVisuals: React.FC<LiveboardProps> = ({
liveboardId,
visualId,
}) => {
const embedRef = useEmbedRef() as React.MutableRefObject<LiveboardEmbedRef>;

return (
<LiveboardEmbed
ref={embedRef}
liveboardId={liveboardId}
vizId={visualId}
onParameterChanged={(e) => {
console.log('onParameterChanged');
console.log(e);
}}
/>
);
};
import { Action, LiveboardEmbed as LiveboardEmbedRef } from '@thoughtspot/visual-embed-sdk';

const LiveboardVisuals: React.FC<LiveboardProps> = ({
liveboardId,
visualId,
}) => {
const embedRef = useEmbedRef() as React.MutableRefObject<LiveboardEmbedRef>;

return (
<LiveboardEmbed
ref={embedRef}
liveboardId={liveboardId}
vizId={visualId}
onParameterChanged={(e) => {
console.log('onParameterChanged');
console.log(e);
}}
/>
);
};
Aim: When the user applies a parameter, the console log should be called.
onParameterChanged={(e) => {
console.log('onParameterChanged');
console.log(e);
}}
onParameterChanged={(e) => {
console.log('onParameterChanged');
console.log(e);
}}
Issue: When the user applies a parameter, the console log is not called. Furthermore, I tested with onFilterChanged:
onFilterChanged={(e) => {
console.log('onFilterChanged');
console.log(e);
}}
onFilterChanged={(e) => {
console.log('onFilterChanged');
console.log(e);
}}
and it logs to the console. So, is onParameterChanged not working in v1.33.3?
36 Replies
shikharTS
shikharTS4mo ago
@Justin Mathew can you check if this is not working in 1.13.3? cc @utsav.kapoor
Justin Mathew
Justin Mathew4mo ago
let me check @shikharTS @baran can you share the thoughtspot version as well ?
baran
baranOP4mo ago
@thoughtspot/visual-embed-sdk v1.33.3
Justin Mathew
Justin Mathew4mo ago
click on the ? on thoughtspot cluster
No description
Justin Mathew
Justin Mathew4mo ago
youll see something like this
No description
baran
baranOP4mo ago
@Justin Mathew Version: 10.1.0.cl-215
Justin Mathew
Justin Mathew4mo ago
thank you , let me check @baran i checked its seems to work for me , would it be possible to record a video of what you are trying
baran
baranOP4mo ago
sure i will do it now
Justin Mathew
Justin Mathew4mo ago
is possible you can test here as well : https://codesandbox.io/p/sandbox/authmethod-testing-m8l3cm
baran
baranOP4mo ago
baran
baranOP4mo ago
baran
baranOP4mo ago
baran
baranOP4mo ago
sure, i will take a look at it now - What is "TS host"? - How can I find my "TS host"? - Could you give an example for "TS host"?
Justin Mathew
Justin Mathew4mo ago
tshost is the thoughtspot server url
baran
baranOP4mo ago
is it https://PROJECT_NAME.thoughtspot.cloud/?
Justin Mathew
Justin Mathew4mo ago
yes
baran
baranOP4mo ago
I tried every AuthType. When I click on the "init" button, the app throws one of the error/warning above
No description
No description
Justin Mathew
Justin Mathew4mo ago
its fine, you might haev to white list the sandbox, the video should be enough can you give EmbedEvent.ALL a try
baran
baranOP4mo ago
is that equivalent to onALL={} prop in the React library?
Justin Mathew
Justin Mathew4mo ago
yes
baran
baranOP4mo ago
trying, 2 sec
baran
baranOP4mo ago
baran
baranOP4mo ago
I checked all the logged event objects, there is nothing about the parameter being changed
Justin Mathew
Justin Mathew4mo ago
thats strange , let me see if there are some recent fixes for this cause code wise its looks correct
baran
baranOP4mo ago
I might be onto a bigger issue: I created a similar issue yesterday about trying to update parameters with embedRef.current.trigger(HostEvent.UpdateParameters, (link to the discord thread: https://discord.com/channels/1143209406037758065/1295423570729762827/1295676102819188776). Running the code does nothing, so it makes me wonder if the issue in this thread is linked to that issue
Justin Mathew
Justin Mathew4mo ago
this could be it, there were some fixes around this can you give me your cluster name i.e PROJECT_NAME i ll ask in internal forums
baran
baranOP4mo ago
could i dm you?
Justin Mathew
Justin Mathew4mo ago
yes
baran
baranOP4mo ago
thanks, i sent it
Justin Mathew
Justin Mathew4mo ago
thank youu, let me find some info ref cc: @utsav.kapoor @Aditya @baran We do have fixed this in later versions , i ll check with team on how to get your cluster the fixes
Aditya
Aditya4mo ago
@baran Can you please share the HAR for updateParameters not working?
baran
baranOP4mo ago
HAR file of the network tab in chrome devtools?
Aditya
Aditya4mo ago
Yes @baran
baran
baranOP4mo ago
okay, i will do it now. Give me 1-2 mins I direct messaged you a screenshot and the HAR file
Aditya
Aditya4mo ago
Thanks @baran for connecting. I checked with @baran and the parameters are getting applied but the parameter chips were not getting updated as in 10.1 we are updating parameter runtime. The update of liveboard spec is being supported from 10.3 onwards. @baran will check with Thoughtspot account executive to check when there cluster will get upgraded to 10.3. He is unblocked now.
baran
baranOP4mo ago
yes, thank you very much Aditya and Justin 🙏

Did you find this page helpful?