Im trying to trigger a callback from the custom context menu defined in the dashAgGridFunction.js file using the dcc.store declared in app.layout under ddk.header component, However its not all triggering this call back when I click the respective option in the context menu.
Im doing this way in my custom conextmenu action method:
const emailStore = document.getElementById(‘email-store’);
console.log(“email”,emailStore);
emailStore.data = JSON.stringify({ details: params.node.data });
// Trigger the callback by dispatching a change event
emailStore.dispatchEvent(new Event('change'));
Yeah, you can do that too. But if you want dash to reflect, then you should use the dash_clientside.set_props.
For example, say you want to provide a notification to the user that the fetch request has been sent and then update the notification when the request has completed.
we are using enterprise version 5.4 and also when I’m trying to deploy the custom api in one of our envs Im getting 405 however its working fine in other env’s workspace. Just wanted to know if dash is blocking in any way?
sure, But Im not trying to use the set_props as its not working for us. However as mentioned previously I wrote a custom api to be called from dashAgGridFunction.js file and when I’m trying to deploy and test it in one of our envs its giving 405 error when its calling that API and In the response headers from network tab I see allow as GET,HEAD,OPTIONS. I’m not sure who set these because we didnt set anything as such to allow only these methods.
Another weird thing for the same env where its throwing 405 and when I try to run and test using workspace its working fine again and I’m totally not understanding of this behavior, can u please help?
Also, another quick question where can I find what all details will be included in get_user_data() method of auth in the dash enterprise docs as I wanted to see if it includes user email or not?
As you are using DE, you should contact your Plotly Service rep for those answers.
dash_clientside.set_props should be working and is much cleaner to navigate, no hidden buttons, no extra steps to trigger a callback because it sends the updates via the dash ecosystem.