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

Add library loading capacity to _allow_dynamic_callbacks. #2789

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

T4rk1n
Copy link
Contributor

@T4rk1n T4rk1n commented Mar 11, 2024

When _allow_dynamic_callbacks=True, callback can now import a component library and automatically loaded on the callback returns. Same restrictions as adding callbacks during callbacks, only guaranteed to work for a single user, meant to be used for development purposes.

@ndrezn
Copy link
Member

ndrezn commented Mar 12, 2024

@chriddyp / @hatched I think we should make a build of Dash based on this version and test whether we resolve the issue in App Studio with third-party component libraries. What do you guys think? Happy to create that build if so.

Comment on lines +13 to +18
prom = new Promise<void>((resolve, reject) => {
element.onload = () => {
resolve();
};
element.onerror = error => reject(error);
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since the way you are creating the promise is the same for both, you could extract that into a function to avoid duplication. Like with a makePromise(element) which would do that.

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

Successfully merging this pull request may close these issues.

None yet

3 participants