Hello!
I’m trying to write an IF function that will trigger with any value of the dropdown.
This is the simplified code:
app.layout = html.Div(children=[
dcc.Dropdown(id='dpdw_filter', options=df['exam'].unique())])
@app.callback(
Output(component_id='fig_line', component_property='figure'),
Input(component_id='dpdw_filter', component_property='value'))
def update_plot(selection):
if selection is None:
chart = px.line(data_frame = another_df ....
So, selection is None work fine when nothing is selected in the dropdown, now I want to change this code to the exactly opposite. I want the action to be trigger by any value of the dropdown.
if selection == value should work? For now I’m not able to make it work