I’ve modified your example slightly and this seems to work for me ok:
# -*- coding: utf-8 -*-
import dash
import dash_html_components as html
import dash_core_components as dcc
from dash.dependencies import Input, Output, State, Event
app = dash.Dash()
app.config.supress_callback_exceptions=True
app.layout = html.Div([
dcc.Location(id='url', refresh=False),
html.Div(id='page-content')])
@app.callback(Output('page-content', 'children'),[Input('url', 'pathname')])
def generate_layout(url):
return html.Div([
html.Label('Multi-Select Dropdown'),
dcc.Dropdown(
options=[
{'label': 'New York City', 'value': 'NYC'},
{'label': u'Montréal', 'value': 'MTL'},
{'label': 'San Francisco', 'value': 'SF'}
],
value=['MTL', 'SF'],
multi=True,
id='input'
),
html.Div(id='output')
])
@app.callback(Output('output', 'children'), [Input('input', 'value')])
def display_output(value):
return 'You have selected "{}"'.format(value)
if __name__ == '__main__':
app.run_server(debug=True, host='0.0.0.0')
From your example, it looks like you aren’t supplying a callback to the dropdown that you are rendering. In this case, the dropdown autocomplete doesn’t work. Are you using the dropdown without a callback on its value
in practice?