Dropdown with multiple options output type


I was wondering, how do the values of a multi-dropdown get returned? I’m trying to filter a dataframe using the following method to make a line-graph:

data_filtered = dff[dff.Topic.isin(value)]

Which throws me an error that .isin wants something else:

TypeError: only list-like objects are allowed to be passed to isin(), you passed a [str]

Funnily enough, if I then select some values in the Dash app, the graph does get correctly updated. So perhaps my problem is different from what I think it is…?
What if I could provide my graph with an initial value, that gets overwritten when the user inputs their values?

HI @cmues

The multi-dropdown returns either None if it’s not initialized or a list.

Note that if you set an initial value, it must be in a list, even if it’s one item - for example

        {'label': 'New York City', 'value': 'NYC'},
        {'label': 'Montreal', 'value': 'MTL'},
        {'label': 'San Francisco', 'value': 'SF'}

If this doesn’t answer your question could you post a MWE that duplicates the error?