Hi @nickmuchi This is a good topic, and thanks for finding that detailed discussion - There’s a good summary in this post: 📣 Dash v1.11.0 Release - Introducing Pattern-Matching Callbacks - #25 by alexcjohnson, and it’s worth repeating this point here:
- If any
Input
items are present (or the multi-item exception), we will fire the callback, and it’s an error if any of theOutput
orState
items is missing.
With multi-page apps, components in the layout of app.py
are available to all pages. If a component is in a page layout, then it’s only present when you are on that page.
So, the issue is in this callback:
In this callback, all components in the Inputs and Outputs are in app.py except for the dropdown which is only in page1. So if you click on the button while you are on page1, there is no error. However, if you click on the button while on the home page, the dropdown does not exist, so you will see the error.
You could move the button and datepicker to page1. However, I’m guessing that you are using those to refresh data and share it between pages. In that case, I recommend splitting the callback. One to update the data, then use a dcc.Store as an Input to trigger the update of the dropdown options.
Let me know if you have more questions