Is it possible to have an “All” option in the select widget. E.g. if I select “all” it does not filter the data, if I select a value it filters on that value.
Thanks
Is it possible to have an “All” option in the select widget. E.g. if I select “all” it does not filter the data, if I select a value it filters on that value.
Thanks
Hi @nicklatocha,
This is not currently possible with the Selectbox. Perhaps you could handle this in your application code?
import streamlit as st
options = ("all", "male", "female")
value = st.selectbox("selectbox 1", options, 1)
if value == "all":
value = options
st.write("value 1:", value)
Let me know if something like this works for you.
Perfect! Didn’t think about that!
Nick
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.