"All" value by default and chained selectbox

Hi! How to leave the value β€œAll” by default in the select box and the other selectbox below in the hierarchy appear as I choose a value other than β€œAll”?

options = [1,2,3]
selected = st.multiselect('Choose:', options)
if selected == []:
    selected = options
st.write(selected)

Or you can get fancier if you want: 'Select All' on a Streamlit Multiselect - #2 by Marisa_Smith

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.