You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are developing a dash application that needs to be embedded on another web application using the dash-embedded-component from Dash Enterprise.
Also, we are using DashProxy to enable us to use some built-in transforms of this library. We have realised that the callbacks work properly when accessing the app directly through Dash Enterprise, but not when it is embedded into another website.
It looks like there is some incompatibility between DashProxy and Dash Embedded Component. Using the simple example below, the callback is not being called, but changing DashProxy for Dash makes it work. Would you mind helping us with this?
fromdashimportDash, html, Input, Outputfromdash_extensions.enrichimportDashProxyfromdash_embeddedimportEmbeddableapp=DashProxy(__name__, plugins=[Embeddable(origins=[r'^.+dash.tests(:\d+)?'])])
server=app.server# expose server variable for Procfileapp.layout=html.Div([
"Press button to execute callback",
html.Button("Click me!", id="button"),
html.Div(id="my-div")
])
@app.callback(Output('my-div', 'children'), [Input('button', 'n_clicks')])defupdate_graph(n_clicks):
returnf"You have clicked the button {n_clicks} times"if__name__=='__main__':
app.run_server(debug=True)
It's probably related to the app initialization being different when using the Embeddable plugin, causing the callback transformation to not being invoked correctly. Unfortunately, I don't have access to Dash Enterprise, so I am not able to help.
Hi,
We are developing a dash application that needs to be embedded on another web application using the dash-embedded-component from Dash Enterprise.
Also, we are using DashProxy to enable us to use some built-in transforms of this library. We have realised that the callbacks work properly when accessing the app directly through Dash Enterprise, but not when it is embedded into another website.
It looks like there is some incompatibility between DashProxy and Dash Embedded Component. Using the simple example below, the callback is not being called, but changing DashProxy for Dash makes it work. Would you mind helping us with this?
Screenshot of the application and its network calls when callback is working (you can see that an extra request is made):
Screenshot of the application when callback is not working:
The text was updated successfully, but these errors were encountered: