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

dynamic callback creation #2649

Merged
merged 12 commits into from
Oct 6, 2023
Merged

dynamic callback creation #2649

merged 12 commits into from
Oct 6, 2023

Conversation

T4rk1n
Copy link
Contributor

@T4rk1n T4rk1n commented Sep 29, 2023

Add a new app.callback argument: _allow_dynamic_callbacks to add new callbacks defined inside a callback.

  • Only app.callback for the same will be registered.
  • Need to return a value from the callback, PreventUpdate not supported in the callback creator.
  • Only the user that created the callback will receive the updated callbacks, other users would need to refresh.

⚠️ Intended for internal usage, use only with a local server for 1 user per app.

@T4rk1n T4rk1n force-pushed the feat/dynamic-callback-creation branch from 7a75154 to 972281d Compare October 5, 2023 15:22
Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃 Looks great, feel free to merge after considering my comment on the test, and (as discussed) adding a note in the changelog and in the test case about how this feature is dangerous, has numerous ways it can break, and is not for production, multi-user, or multi-process use.

@T4rk1n T4rk1n merged commit 97f0fdc into dev Oct 6, 2023
3 checks passed
@T4rk1n T4rk1n deleted the feat/dynamic-callback-creation branch October 6, 2023 13:58
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

2 participants