Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.
This repository was 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

Description

@IvoLeist

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions