Skip to content

Commit be60884

Browse files
committed
add test
1 parent 2b0a7d1 commit be60884

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

components/dash-core-components/tests/integration/dropdown/test_search_value.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,41 @@ def send_key(key):
107107
last_option.click()
108108

109109
dash_duo.wait_for_text_to_equal("#output", "value=opt_100")
110+
111+
112+
def test_ddsv003_dropdown_virtualized_component_label_filtering(dash_duo):
113+
app = Dash(__name__)
114+
115+
options = [
116+
{
117+
"label": html.Div(["Item ", html.Span(f"#{i}")]),
118+
"value": f"item_{i}",
119+
"search": f"item_{i}",
120+
}
121+
for i in range(1, 2000)
122+
]
123+
124+
app.layout = html.Div(
125+
[
126+
dcc.Dropdown(
127+
id="dd",
128+
options=options,
129+
value="item_1",
130+
searchable=True,
131+
clearable=True,
132+
)
133+
]
134+
)
135+
136+
dash_duo.start_server(app)
137+
138+
dropdown = dash_duo.find_element("#dd")
139+
dropdown.click()
140+
141+
search = dash_duo.find_element(".dash-dropdown-search")
142+
143+
# trigger filtering path that used to crash virtualized list
144+
search.send_keys("199")
145+
sleep(.5)
146+
147+
assert dash_duo.get_logs() == []

0 commit comments

Comments
 (0)