Running a standard dash-plotly app with a dropdown, I would like to simulate a click on the dropdown via javascript. The dropdown opens when I click on it via the mouse but does not respond to the JS call ($('#mydropdown.dash-dropdown').click()
).
Any ideas what is going on here?
import dash
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash(__name__)
app.layout = html.Div(
[
dcc.Dropdown(
id="mydropdown",
options=[
{"label": "New York City", "value": "NYC"},
{"label": "Montreal", "value": "MTL"},
{"label": "San Francisco", "value": "SF"},
],
value="MTL",
clearable=False,
),
]
)
if __name__ == '__main__':
app.run_server(host='0.0.0.0', debug=True, port=8099)