Skip to content

Add parameter to enable/disable text search in st.selectbox #6160

@cmayoracurzio

Description

@cmayoracurzio

Problem

st.selectbox is one of the most widely used Streamlit widgets, as it allows the user to select one option from a list of options.

The current implementation allows text searching, which for some use cases makes sense (e.g., a long list of countries), but for others it makes the widget feel buggy (e.g., a selectbox with very few options, such as "Yes, No").

Solution

MVP: An example on how to use the CSS st.markdown trick to disable text search in st.selectbox.

Preferred solution: A parameter that allows enabling/disabling the text search behavior in st.selectbox.

Additional context

This is one of several UX issues detected for st.selectbox. Others are:


Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.

If you'd like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.

Views

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:st.selectboxRelated to the `st.selectbox` widgettype:enhancementRequests for feature enhancements or new features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions