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

st.multiselect is too high when multiple options are selected #8671

Open
4 tasks done
achaosss opened this issue May 15, 2024 · 2 comments
Open
4 tasks done

st.multiselect is too high when multiple options are selected #8671

achaosss opened this issue May 15, 2024 · 2 comments
Labels
feature:st.multiselect type:enhancement Requests for feature enhancements or new features

Comments

@achaosss
Copy link

achaosss commented May 15, 2024

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

When I use multiselect, I find that the selected content pushes the original content downwards. I wonder if there is any other solution.

image

When i use multiselect, It became
image

I would like to know if there are any other solutions.

Reproducible Code Example

No response

Steps To Reproduce

No response

Expected Behavior

No response

Current Behavior

No response

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version:
  • Python version:
  • Operating System:
  • Browser:

Additional Information

No response

@achaosss achaosss added status:needs-triage Has not been triaged by the Streamlit team type:bug Something isn't working labels May 15, 2024
Copy link

If this issue affects you, please react with a 👍 (thumbs up emoji) to the initial post.

Your feedback helps us prioritize which bugs to investigate and address first.

Visits

@jrieke jrieke added type:enhancement Requests for feature enhancements or new features and removed type:bug Something isn't working status:needs-triage Has not been triaged by the Streamlit team labels May 15, 2024
@jrieke
Copy link
Collaborator

jrieke commented May 15, 2024

Hmm good point. I'm converting this to an enhancement because it's expected behavior today. We should probably think about adding a height parameter or a parameter to control line wrapping to st.multiselect. As a workaround, you can put it in a container with fixed height for now, which will enable scrolling:

st.container(height=50).multiselect(...)

Or you could try a popover container, so the multiselect doesn't show on the page itself:

st.popover("Show filter").multiselect(...)

@jrieke jrieke changed the title st.multiselect make the dashboard layer chage st.multiselect is too high with lots of options May 15, 2024
@jrieke jrieke changed the title st.multiselect is too high with lots of options st.multiselect is too high when multiple options are selected May 15, 2024
@streamlit streamlit deleted a comment from github-actions bot May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:st.multiselect type:enhancement Requests for feature enhancements or new features
Projects
None yet
Development

No branches or pull requests

2 participants