Bring Drag & Drop to Dash with Dashboard Engine. đź’« Learn how at our next webinar!

DropDown Multi value return inconsistent

I am trying to generate a CheckList based on a DropDown.

When I run my code everything works fine. The DropDown is populated from a DataFrame and then the DropDown’s value populates the CheckList’s options.

However if a change is made to the DropDown then the CheckList immediately goes blank and becomes unresponsive.

After getting it to print out what the CheckList was receiving I found out why. When the CheckList is populated by the DataFrame it receives something akin to the following:

 [{'label': 'Break', 'value': 'Break'}, {'label': 'Col3', 'value': 'Col3'}]

However if a change is made (say Break is removed then added) it switchs to the following:

['Break','Col3']

it changes from giving the values in the same format that it reads them to a simple list format.

Am I missing something obvious functionality wise or is it not supposed to be doing this

Many Thanks

As a workaround I’m going to check the first element and if its a dictionary type then I will have it do one thing and if its not then it will do something else.

I’m an idiot. I was passing the value of the dropdown in the format of options (as a dictionary). Weird that it was taking it as a valid argument, however this is why my results were inconsistent.