Black Lives Matter. Please consider donating to Black Girls Code today.

Join several dash components into one parameter for a callback

Hello.

I’m programatically generating several checklists (I don’t know how many of them there will be) and I want their values to aggregate and become one parameter of a @app.callback.
In other words, I have several checklist, one for a topic, that I generate dynamically with my python code, but I don’t know how many topics there are beforehand. I want all the checklist to form the user selection which will be one State() parameter of the @app.callback.

How can I do that?
I have thought that if State allowed a component_className instead of an id and merged all the values coming from those classed components, I would be able to do a callback that retrieves all the checklist values as one param.

1 Like

Each component/attribute pair is its own State or Input, it’s not possible to combine them right now. They all need to be defined upfront at as well.
Dynamic number of inputs based on anther input and Callback for Dynamically created Graph might be helpful for you as well.

1 Like