Skip to content

[WIP / POC] Ability to prevent initial callback from firing #1123

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

Closed
wants to merge 1 commit into from

Conversation

chriddyp
Copy link
Member

Via a new property in the app.callback, prevent_initial_call=True

@app.callback(Output('another-output', 'children'), [Input('another', 'value')], prevent_initial_call=True)

This will prevent it for both initial renders in app.layout as well as new component renders from a callback.

WIP / POC for now. Would need lots of tests.

@christianwengert
Copy link

+1 I believe this would be very useful. With the wildcards it can happen very quickly, that I have like one hundred initial callbacks which make the app very unresponsive for a couple of seconds. By preventing all wildcards to fire this would be much faster and better

@alexcjohnson
Copy link
Collaborator

superseded by #1225

@alexcjohnson alexcjohnson deleted the skip-first-update branch May 4, 2020 21:04
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.

3 participants