Improved callback_context#1952
Conversation
callback_context
| from . import dash_table # noqa: F401,E402 | ||
| from .version import __version__ # noqa: F401,E402 | ||
| from ._callback_context import callback_context # noqa: F401,E402 | ||
| from ._callback_context import callback_context, ctx # noqa: F401,E402 |
There was a problem hiding this comment.
Does this need to be a separate instance? Can we just say ctx = callback_context after all the imports, and remove the extra instantiation?
|
@alexcjohnson I completed the following:
Also, I removed the extra |
|
IDK whether this is the right spot. I'd just want to mention that there's a typo in this example: it says
|
|
@MattesR Thanks for your comment. I think the examples in the initial write-up for this PR were confusing because the names changed during review. For example I just updated the comment to remove all the examples here and point people to the ones in the announcement on the community forum. |
closes # #1818
#1054
See also: Community Forum Discussion
This PR adds features to
dash.callback_contextto make it easier to use:ctxas an alias fordash.callback_contextDetermining which input triggered a callback
The new features will replace boilerplate such as:
👉 See the Announcement in the forum for details and examples.