0
votes

I am creating an application using Plotly/Dash and I am trying to dynamically update the number of inputs that show up in my application, based on the user input from the dropdown. All of this happens inside a tab. However, when I try to do a for loop through the callback to get a fixed number(2) headers, I get this error saying:

The children property of a component is a list of lists, instead of just a list.

In the layout I defined:

[dcc.Input(type= 'number', id='input %i'%i) for i in range(2)]

And the corresponding decorator is

[app.callback(Output('input %i' % i, 'value'),Input('dropdown-profile-specific', 'value'))(lambda value: None) for i in range(2)] 

How would I unnest this to get rid of this error. Additionally, how can I make the number of iterations dependent on the length of a list that is provided as the output from another callback?