Hi all,
I have been trying to get conditional dropdowns to work in a datatable, but the options in the dropdown columns don’t load properly. Each cell will show an arrow for a dropdown, but when clicked nothing will show up.
Here is the code for the datatable:
dtb.DataTable(id='conditional_column_dropdown_experiments',
data=df.to_dict('records'),
columns=[
{'name': col, 'id': col, 'type': 'dropdown'}
for col in cols
],
editable=True,
column_conditional_dropdowns=[
{
'id': col,
'dropdowns': [
{
'condition': 'index eq "{}"'.format(val),
'dropdown': [
{'label': i, 'value': i}
for i in list(range(5))
]
}
for val in index_val]
}
for col in cols if col != 'index'
]
)
Where cols and index_val are lists generated from the dataframe where the dropdowns are necessary.
I have tied the table to a basic callback, but there is still no luck rendering the dropdowns.
Thanks in advance for your help!
AHB