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

[Select] [joy] handle long text content #37289

Merged
merged 2 commits into from
May 29, 2023

Conversation

akash191095
Copy link
Contributor

Fixes #37277

Please advise if this is a good way to deal with this issue.

I can hide the scrollbars by just putting overflow: "hidden" but in order to show the ellipsis I had to first put the content inside a span tag and add width: 0 to it.

This is needed as the button is a flex container due to which I can't directly add text-overflow: "ellipsis" to it.
https://css-tricks.com/flexbox-truncated-text/

Visually everything seems to be working fine.

Screenshot 2023-05-16 at 5 26 48 PM Screenshot 2023-05-16 at 5 26 42 PM Screenshot 2023-05-16 at 5 38 43 PM

@mui-bot
Copy link

mui-bot commented May 16, 2023

Netlify deploy preview

https://deploy-preview-37289--material-ui.netlify.app/

Bundle size report

Details of bundle changes

Generated by 🚫 dangerJS against ecdace5

@zannager zannager added component: select This is the name of the generic UI component, not the React module! package: joy-ui Specific to @mui/joy labels May 16, 2023
@zannager zannager requested a review from siriwatknp May 16, 2023 12:33
Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks for the fix. I think changing from 'auto' to 'hidden' should be enough.

@siriwatknp siriwatknp merged commit a8946d3 into mui:master May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: select This is the name of the generic UI component, not the React module! package: joy-ui Specific to @mui/joy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Select][Joy] Long text in Select shows scrollbar in Chromium-based browsers
4 participants