Hi team,
I’m trying to update 2 dropdowns using value from a datatable (single selection only), upon a row been selected. I’m running into error after selecting the row. I’m wondering if I am not using the “selected_rows” property right.
Many thank for any help.
@app.callback(
[Output('dropdown1', 'value'),
Output('dropdown2','value')
],
[Input('datatable', 'data'),
Input('datatable', 'selected_rows')
])
def update_dropdown(data,selected_rows):
dropdown1=data[selected_rows]['column1']
dropdown2=data[selected_rows]['column2']
return dropdown1, dropdown2
3 posts - 2 participants







