Skip to content

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

Closed
chriddyp wants to merge 1 commit intodevfrom
skip-first-update
Closed

[WIP / POC] Ability to prevent initial callback from firing#1123
chriddyp wants to merge 1 commit intodevfrom
skip-first-update

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