Open JFKraasch opened 9 months ago
Thank you for bringing the bug in the example to my attention. After checking the issue, it appears that the problem stems from the direct output to the boxPanel children in the callback. It's better to use
a.clientside_callback(
"""
function(buttons) {
ctx = window.dash_clientside.callback_context;
try {
// Extract the triggered input
triggered_input = JSON.parse(ctx.triggered[0].prop_id.replace(".n_called", "")).url;
console.log(triggered_input);
window.location.href = triggered_input;
} catch (error) {}
return window.dash_clientside.no_update;
}
""",
Output('dummy', 'children'),
Input({"type": "changePage", "url": ALL}, "n_called"),
initial_callback=False
)
I am not aware of a callback without output. To address this, I use a dummy element in the callback, which should also be present on the second page. This adjustment should help resolve the issue and ensure smoother functionality across pages.
That makes sense. One thing I was wondering is if there is a way of incorporating the components in a form like: https://community.plotly.com/t/multipage-persistence/10682/2
Since I would like to be able to keep some persistence between pages, e.g. my end goal is having a data uploading page as a home page and then opening a Dashboard with lumino components, and users being able to go back to the data loading and that not resetting either the data loaded or the dashboard
I brought up the usage of the components in multipage dash apps before. A workaround was proposed, but I am still running into issues.
When interacting with the widgets an error appears and the widget no longer spans the entire height of the page. Also it is impossible to move back from page2 to page1