VK / dash-lumino-components

This package integrates Lumino Widgets, the basis of JupyterLab, into Plotly's Dash.
MIT License
27 stars 1 forks source link

dlc.BoxPanel's addToDom issues with multipage apps #36

Closed JFKraasch closed 7 months ago

JFKraasch commented 7 months ago

I am creating a Multi-page app using Dash and for one of the pages I would like to use your wonderful implementation of the lumino-components.

One issue I run into is that when I switch away from a page with a BoxPanel, where addToDom=True, it continues showing underneath the content of the new page. Is there a way of fixing that. I am happy to provide an example if neccessary.

VK commented 7 months ago

Currently, the multi-page setup in Dash isn't fully supported with the lumino-components. However, I can suggest an alternative approach that should address your needs.

Instead of using the multi-page setup directly within Dash, I recommend creating a Flask application that hosts two separate Dash apps, one for each page you intend to have. This approach will allow you to cleanly switch between pages without encountering the issue you described.

There is an example at https://github.com/VK/dash-lumino-components/blob/master/examples/multiplage.py

JFKraasch commented 7 months ago

Thank you! This is very helpful!