-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Ability to prevent initial callback from firing #1225
Comments
@alexcjohnson Initial reaction is also that As we want to conserve backward compatibility, we will want |
Absolutely.
That's a good idea, should be an easy add. I'd call the global one |
Personally I also prefer that C should fire -- I can imagine why an app developer would want to take advantage of this, and if I understand correctly, this seems to be what a more experienced user of Dash would expect (outside of suspending initial execution of A and B) under the circumstances. |
👍 That reasoning is sound to me |
I also agree, I would expect C to fire unless explicitly silenced. I also think that this is a more advanced dash feature. |
@chriddyp started prototyping this in #1123 and I'm preparing a new PR that will supersede #1123 with a more complete implementation and tests. But a question about how this should work regarding later callbacks:
Currently if all of the inputs to callback C are themselves outputs to other callbacks A and B, we effectively do not treat C as an "initial callback" - that is, it won't trigger without one of its inputs changing, so if A and B both raise
PreventUpdate
on page load (or layout chunk load), C will not be called.The question is how this should apply to
prevent_initial_call
- if A and B both haveprevent_initial_call=True
, is that equivalent toPreventUpdate
so C should not fire? Or is it as though A and B are simply not considered initially and the initialization chain should start at C?My initial reaction is that this case is not the same as
PreventUpdate
and C should fire. My reasoning:prevent_initial_call=True
on C as well.Anyone care to argue the other side? @Marc-Andre-Rivet @chriddyp @christianwengert do you agree?
The text was updated successfully, but these errors were encountered: