-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
feature:st.multiselectRelated to the `st.multiselect` widgetRelated to the `st.multiselect` widgetpriority:P3Medium priorityMedium prioritystatus:confirmedBug has been confirmed by the Streamlit teamBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedSomething isn't working as expected
Description
Checklist
- I have searched the existing issues for similar issues.
- I added a very descriptive title to this issue.
- I have provided sufficient information below to help reproduce this issue.
Summary
The st.multiselect ignores placeholder parameter when options is an empty list ( or empty sequence in general) . This is even more prominent when using accept_new_options=True, as the input is not disabled then.
Reproducible Code Example
import streamlit as st
foo = st.multiselect(
"Select Foo",
options=[],
accept_new_options=True,
placeholder="foo placeholder",
)
bar = st.multiselect( # works correctly
"Select Bar",
options=["bar1", "bar2", "bar3"],
accept_new_options=True,
placeholder="bar placeholder",
)Steps To Reproduce
- Run the example provided
- Compare the rendered placeholder with passed parameters
Expected Behavior
The Select Foo input placeholder should be foo placeholder not Add options.
Current Behavior
The first multiselect has the default placeholder.

Is this a regression?
- Yes, this used to work in a previous version.
Debug info
- Streamlit version: 1.45.1
- Python version: 3.13.2
- Operating System: MacOs 15.5
- Browser: Firefox 139.0.4, Chrome 137.0.7151.104
Additional Information
No response
github-actions
Metadata
Metadata
Assignees
Labels
feature:st.multiselectRelated to the `st.multiselect` widgetRelated to the `st.multiselect` widgetpriority:P3Medium priorityMedium prioritystatus:confirmedBug has been confirmed by the Streamlit teamBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedSomething isn't working as expected