Checklist
Summary
When using st.multiselect it now includes "Select all" (was introduced in Streamlit version 1.55.0 (via Pull Request #13015) it casues the browser to freeze when clicking select all when having + 100 k items loaded into it, was not a problem before this was added.
I want the options to disable the "select all" button as argument to make the mulitselect component behave like previous versions
Why?
it makes the browser freeze
How?
st.multiselect(label="large multi select", options=largeListOf165k, disableSelectAll=True)
Additional Context
import time
import streamlit as st
st.title("Performance Defect: Cascading st.multiselect with Large Datasets")
st.markdown("""
### Feature Request Context
This example demonstrates a performance bottleneck involving two dependent `st.multiselect` widgets.
Selecting a category in the first widget filters the available choices in the second widget. When the underlying dataset contains 165,000 items, clicking the native **Select all** button on either widget triggers severe serialization overhead, memory spikes, and completely freezes the browser interface on a thinkpad p16 gen 1.
**Requested Feature:** A configuration parameter to natively disable the "Select all" option (e.g., `show_select_all=False`).
""")
# Mock data: 3 groups, each containing 55,000 items (165k total rows)
GROUPS = ["Group_A", "Group_B", "Group_C"]
ITEMS_PER_GROUP = 55000
# First widget: Select groups
selected_groups = st.multiselect(
label="1. Select Item Groups", options=GROUPS, default=["Group_A"]
)
# Generate dependent options based on the selection in the first widget
available_options = []
for group in selected_groups:
available_options.extend([f"{group}_Item_{i}" for i in range(ITEMS_PER_GROUP)])
# Second widget: Filtered choices based on the first widget
# Clicking 'Select all' here on a large subset causes immediate UI failure
selected_items = st.multiselect(
label=f"2. Filtered Items (Current available choices: {len(available_options)})",
options=available_options,
)
st.write(f"Total items selected in widget 2: {len(selected_items)}")
Checklist
Summary
When using st.multiselect it now includes "Select all" (was introduced in Streamlit version 1.55.0 (via Pull Request #13015) it casues the browser to freeze when clicking select all when having + 100 k items loaded into it, was not a problem before this was added.
I want the options to disable the "select all" button as argument to make the mulitselect component behave like previous versions
Why?
it makes the browser freeze
How?
st.multiselect(label="large multi select", options=largeListOf165k, disableSelectAll=True)
Additional Context