I have a dropdown menu, where the options are the names of currently loaded datasets. The default value of the dropdown is the name of the first dataset in the list.
I can write a callback function to get new datasets, and update the options of the dropdown menu. But now, the dropdown menu’s value is no longer set.
Since Dash only lets you update one Output property per callback function, I cannot simultaneously update both the dropdown menu’s options, AND its selected value. Further, if I try to have a second callback function that updates its value, errors occur because it ends up updating the value to the name of a dataset that no longer exists (thanks to the first callback function).
How do you update multiple properties of an Output at the same time?