Hi ,
I am tring to highlight rows by input
The table looks like
Where users are allowed to select ‘bid_qty’ via a dropdown box. In the caseabove, ‘bid_qty’ is 87.
In another word, ‘bid_qty’ is an input variable for the table.
Users can also select other ‘bid_qty’ such as 26 or 4 from dropdown box.
If a user seIelect 4 in ‘bid_qty’ box , I want to highlight the selected row accordingly
I read the documentation and I knew I can hard-code the style, like
@app.callback(Output(...)
[Input('bid_qty_dropdown', 'value')]
def update_table(selected_qty)
...
style = (
[{'if': {'filter_query': '{bid_qty} = "87"'}, 'backgroundColor': 'RebeccaPurple','color': 'black'}]
)
The code above only applies when ‘bid_qty’ == 87.
I tried
style = (
[{'if': {'filter_query': '{bid_qty} = selected_qty'}, 'backgroundColor': 'RebeccaPurple','color': 'black'}]
)
However that doesnt work .
Can someone help ? Thanks