Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make st.selectbox dropdown re-open at position of last selected option, not at the top every time #4901

Open
cmayoracurzio opened this issue Jun 28, 2022 · 3 comments
Labels
feature:st.selectbox type:enhancement Requests for feature enhancements or new features

Comments

@cmayoracurzio
Copy link

cmayoracurzio commented Jun 28, 2022

Problem

When using a st.selectbox widget with many options, the dropdown always reopens at the top, even if the last selected option is somewhere down in the list of options. This is only noticeable when the dropdown has a scrollbar (i.e., when there are many options).

Related yet different issue: #4671

Solution

Preferred solution: The dropdown in st.selectbox always opens up at position of last selected option.

Additional context

From the user's perspective, reopening a st.selectbox dropdown at a position that doesn't show the last selected option is confusing.


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.

@jrieke
Copy link
Collaborator

jrieke commented Jul 1, 2022

Hey @marduk2,

thanks for the idea! This seems reasonable, I'll add it to our roadmap. It's not super high priority in my eyes though, so I'd expect this to take a bit longer to fix.

@jrieke jrieke added feature:st.selectbox and removed status:needs-triage Has not been triaged by the Streamlit team labels Jul 1, 2022
@cmayoracurzio
Copy link
Author

Hey there @jrieke,

Thanks for replying and tagging this properly, appreciate it! Our users will be very happy if this improvement gets made :)

Also consider the other yet related issue which I already added a couple of months ago: #4671 (mentioning it in case it makes sense to tackle both at the same time when you get to them).

@RichardHruby
Copy link

+1 here. Especially with long dropdowns, not having to scroll is very much desired by our users as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:st.selectbox type:enhancement Requests for feature enhancements or new features
Projects
None yet
Development

No branches or pull requests

4 participants