-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Closed
Copy link
Description
As reported on the forum by @ marcus:
Problem is in this spot: 'value': "50 , 10"
Specifically comma in value
string makes that selection is not being displayed. When coma is removed or replaced (dot creates no issue) it works fine, but when coma is within the string, the selections are not displayed in the input box and are not removed from the options
This only occurs in Multi-Value dropdowns. This is new in Dash V2.1.0 It works as expected in V2.0.0
from dash import Dash, dcc, html, Input, Output
app = Dash(__name__)
app.layout = html.Div(
[
dcc.Dropdown(
id="dropdown",
className="inputbox-long",
options=[
{"label": "New York City", "value": "50, 10"},
{"label": "Montreal", "value": "MTL" },
{"label": "San Francisco", "value": "SF"},
],
placeholder="Select one or more",
multi=True,
),
html.Div(id="output"),
]
)
@app.callback(
Output("output", "children"), Input("dropdown", "value"),
)
def update(value):
return value
if __name__ == "__main__":
app.run_server(debug=True)
astrowonk
Metadata
Metadata
Assignees
Labels
No labels