I assumed any property of layout elements can be changed via callback, so I tried populating the values of a dcc.Dropdown(multi=True) with the id group-code-select on the click of a button:
Yep, as @adi suggests, you want to target the options property of the Dropdown component, filling it with a list of dropdown dictionaries.
There’s a couple of gotchas with this though. Make sure the options property has an initial value in the layout (empty list if you don’t want any initial values). Also, you need to make sure that your callback always returns a list, even if it’s empty.
It seems my question has been unclear: I know it is possible to set the options of a dropdown (the items that can be selected) this way, but what I am asking here is how to set the already selected items (which I assumed is setting the value property).