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

Dash DataTable - Using Dropdown User Input as Inputs to Another Callback?

This is sooooooooooo cooooooooo! !!!

But how to use the user inputed value as inputs in another callback?


Suppose I want each drop down for each of the column in the data frame that user uploaded. But the number of columns is unknown. I might be able to generate as many dropdown as user’s uploaded column in a returned value of a callback.( [dcc.Dropdown(id = ‘1’), dcc.Dropdown(id = ‘2’),… ]). For each of the dropdown, user will key in values in the text box beside it. I need to use these user input correspond to each of the dropdown in another callback as input. But how could I build a call back to use each of the dropdown and text box values as inputs, since the number of the dropdown is unknown? Can I fit both dropdown and text box in a DataTable?

Thank you much!!!

Ok, I see tutorials on the DataTable DropDowns, (, where user could edit the DataTable values. I think that’s what I need. But how to access user edited value in the DataTable???

The dropdown value will update the data property of the component, which you can use as an dash.dependencies.Input as in this chapter: