-
Notifications
You must be signed in to change notification settings - Fork 4k
[Fix] st.multiselect styling
#11577
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
[Fix] st.multiselect styling
#11577
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
✅ PR preview is ready!
|
| }, | ||
| ControlContainer: { | ||
| style: { | ||
| maxHeight: "10.25rem", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Do you think this will work well with the potential future work of height params with Advanced Layouts? I suppose if we were to introduce such an API, this would become the default maxHeight, and any overrides from the user could take precedence, but wanted to hear your thoughts on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think this could be easily adapted for a potential height param, as you noted would just have user-specified height take precedence over this default maxHeight, but still makes sense to me to have some default (in this case 4 options tall).
Also, currently working on tweaking this from a hard-coded value to a calculated value in rem based on baseFontSize & padding values to better integrate with adv theming 👍🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated - since the margin/padding on the multiselect options is fixed px vs. rem like I thought, opted for a px calc factoring in baseFontSize. This can also be adapted in future to just return the element's height value, which we usually pass as an int.
Describe your changes
Add a
maxHeight&overflowscroll specification tost.multiselectGitHub Issue Link (if applicable)
Closes #9085
Closes #8671
Testing Plan