Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

[BUG ?] dcc.Loading leads to remount after selection change #780

Closed
IvoLeist opened this issue Mar 18, 2020 · 0 comments · Fixed by #740
Closed

[BUG ?] dcc.Loading leads to remount after selection change #780

IvoLeist opened this issue Mar 18, 2020 · 0 comments · Fixed by #740

Comments

@IvoLeist
Copy link

IvoLeist commented Mar 18, 2020

Hello plotly team,

I am about to add my custom component to dash-bio (plotly/dash-bio#496)

Your colleagues asked me why I commented out dcc.Loading for my component. In fact, it shows an unwanted behaviour (Bug?) As soon as you change the selection in a drop-down the component gets remounted causing me too lose all the previous states...

These are important because the component is a new molecular structure viewer in which one of its most important features is that a structure which has been selected before does not need to be reloaded from the back-end but from the browser. Thus, all already loaded structures have to be saved in the state of the app.

If you want to see it on your own just clone my repo (https://github.com/IvoLeist/dash_ngl) and change in usage.py viewer to dcc.Loading (viewer). In the console you will see after each drop-down change the message "component did mount" indicating that the old one got deleted and recreated (see screenshot below).This is not happening if I do not use dcc.Loading.

If you need a more stripped down version of my component
which is able to reproduce that issue just let me know.

Best regards,
Ivo

screenshot_dash_ngl

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant