Multiselect - Select all option

Hello,

Streamlit 1.55 introduced Select all option in the dropdown list. I don’t need this and would like to disable it, but I didn’t see any parameter for this feature. How can I disable it?

Thanks,

chen

Hi Chen, thanks for your question and welcome to the Streamlit community! :balloon: As of now, there is no documented parameter or API in Streamlit 1.55 to disable the “Select all” option in the dropdown list for widgets like st.multiselect. The official documentation and recent PRs do not mention any way to turn off this feature via a function argument or config setting—it’s enabled by default and not user-configurable at this time.

If this behavior is critical for your app, you may want to upvote or comment on related feature requests in the Streamlit GitHub repo, or consider a workaround such as using a custom component. Please share a minimum reproducible example if you need help with a workaround, and let’s see if other community members have creative solutions! :blush:

Sources:

Hi Chen,

I’m currently also facing this problem. I’ve created an issue on the Streamlit GitHub repo: Option to enable/disable the select all option on `st.multiselect` · Issue #14918 · streamlit/streamlit

Hi! I faced a similar challenge and found a simple workaround
using Streamlit’s session state.

You can add a “Select All” button manually like this:

import streamlit as st

options = [“Option A”, “Option B”, “Option C”, “Option D”]

if “selected” not in st.session_state:
st.session_state.selected =

col1, col2 = st.columns([1, 1])

with col1:
if st.button(“Select All”):
st.session_state.selected = options

with col2:
if st.button(“Clear All”):
st.session_state.selected =

selected = st.multiselect(
“Choose options:”,
options,
default=st.session_state.selected
)

st.write(“Selected:”, selected)

This gives you full control over select all behavior
without waiting for an official API update.

Hope this helps!

Since the release of version 1.58, the `select_all` parameter is been introduced to enable/disable/limit the select all option within the st.multiselect widget