I want to make a dashboard where, say, in one dropdown I’ll have a list of countries,
and in the second dropdown I’ll have just cities of the country that I selected
**How can I do that ? **
I want to make a dashboard where, say, in one dropdown I’ll have a list of countries,
and in the second dropdown I’ll have just cities of the country that I selected
**How can I do that ? **
You’ll want to use a callback that takes the value
selected in the first dropdown as the Input
, and Output
s options
to the second. You can read about callbacks here: Part 3. Basic Callbacks | Dash for Python Documentation | Plotly
thank youu so much , It works
But how I can selected by default all values of my countrie in the dropdown Multi ? do you have any idea ?
The selections in a dropdown are stored in its value
property, so you can use your callback to update that at the same time as you update the options.