Skip to content

[BUG] Multi-select dropdown options do not update correctly when labels have HTML component in dash 4.0.0 #3642

Description

@Yunmeng1993

Initially reported on the community forum.

Describe your context

python 3.13.9
dash 4.0.0
  • if frontend related, tell us your Browser, Version and OS

    • Browser: Microsoft Edge for Business
    • Version 145.0.3800.82 (Official build) (64-bit)

Describe the bug

When deselect option(s) in a multi-value dropdown whose label has html component, options update incorrectly.

Expected behavior

When deselect option(s) in a multi-value dropdown whose label has html component, options update correctly.

Reproduction Code

from dash import Dash, dcc, html
app = Dash()
app.layout = html.Div([
dcc.Dropdown(
options=[
{
"label": html.Span("red"),
"value": "red",
"search": "red",
},
{
"label": html.Span("yellow"),
"value": "yellow",
"search": "yellow"
},
{
"label": html.Span("blue"),
"value": "blue",
"search": "blue"
},
],
value=['red','yellow','blue'],
id='test-id-1', multi=True
),
html.Div(id='test-id-2')
])
if __name__ == '__main__':
app.run(debug=True)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions