Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suspend and store callbacks until respective elements become visible #2

Open
rubenthoms opened this issue Mar 28, 2022 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@rubenthoms
Copy link
Collaborator

rubenthoms commented Mar 28, 2022

Is your feature request related to a problem? Please describe.
In our setup, we are using a Content wrapper as one of the main layout components (React) which wraps the current view. When changing the latter, this wrapper's children prop gets updated accordingly. In addition, we also have a separate Settings component that might be shared by different views. When changing a setting in this component, the respective views should get updated accordingly. However, the view that is not active (not part of the Content wrapper's children prop) will not receive any update. This results in the two views being out of sync.

See below for a small diagram illustrating the issue.

Describe the solution you'd like
It would be very helpful to have the option to suspend and store callback updates until the respective elements become visible. Since we have full control over which view is active and which components are part of which view, it would also already be helpful to get more access to the update mechanisms inside Dash in a way that we could install a middleware that stores and dispatches update calls according to the active view.

Describe alternatives you've considered
An alternative would be to send all views in the children prop to the Content wrapper and hide the inactive ones via CSS. However, this might result in poor performance, since complex applications might unnecessarily update multiple heavy components simultaneously.

Additional context
image

@rubenthoms rubenthoms added the enhancement New feature or request label Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant