I would like to have a dropdown in my data table to be able to be changed to update a category component. For example, if a category in the datatable is Groceries, I would like it to display that value initially, and then have the dropdown to be able to select a new category. The Category2 column is the one I am trying to set for the dropdown, the category column is currently just for testing to make sure things match up.
categorieslist=[
{'label': i, 'value': i}
for i in df['Category'].unique()
]
dash_table.DataTable(
id='adding-rows-table-UpdateTransaction',
columns=[
{'name': 'Date','id': 'Date'},
{'name': 'Provider','id': 'Provider'},
{'name': 'Amount','id': 'Amount'},
{'name': 'Category','id': 'Category'},
{'id': 'Category2', 'name': 'Category2', 'presentation': 'dropdown'},
{'name': 'Note','id': 'Note'}],
data=df.to_dict('records'),
editable=True,
dropdown={
'Category2': {
'options': categorieslist,
'value':data[]?
},
},
row_deletable=True
),
Is there a way to do this, or should it be a separate callback maybe to use the row index?