-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Labels
Milestone
Description
Hi!
I noticed that when I update the inputs for ui.input_selectize using ui.update_selectize the first option will still get selected when providing selected=None.
This issue only occurs when multiple has been set to False in ui.input_selectize. It works as expected when multiple=True.
This works as expected:
# UI
ui.input_selectize(
"example1",
"Works as expected",
choices=[],
multiple=True,
selected=None,
),
# Server
ui.update_selectize(
"example1",
choices=["Option1", "Option2"],
selected=None,
)This will automatically select Option1:
# UI
ui.input_selectize(
"example2",
"Unexpected behavior",
choices=[],
multiple=False,
selected=None,
),
# Server
ui.update_selectize(
"example2",
choices=["Option1", "Option2"],
selected=None,
)