prevent_initial_callback appears to have no effect on page load for multi-page apps
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
Currently using dash 1.18.1, trying to use prevent_initial_callback=True. For multi-page apps, I do not want certain callbacks to trigger when loading a specific page. However, prevent_initial_callback appears to have no effect. Each page is considered as an external link. Should I just check if n_clicks = None?
Don't think it matters but I have a flat structure shown in the dash tutorials
- app.py
- layouts.py
- callbacks.py
- index.py
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported behavior in the flat app structure: app.py, layouts.py, callbacks.py, and index.py, using Dash 1.18.1 and multi-page navigation. Confirm whether prevent_initial_callback is ignored on page load, then define the expected callback behavior and capture it in a minimal regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100