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

bug(MatSelect): Mat select not able to handle long text in the dropdown correctly #28778

Open
1 task done
mrjihai opened this issue Mar 26, 2024 · 2 comments
Open
1 task done
Labels
area: material/select P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@mrjihai
Copy link

mrjihai commented Mar 26, 2024

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

Used to work in version 13

Description

The mat select not able to handle long text in the dropdown correctly in Angular 17.

Reproduction

StackBlitz link:
Steps to reproduce:

  1. Set a long text value in mat-option
    2.Click the select and check the value in dropdown

Expected Behavior

WeChatee3ee209e851c46bea0de111925bb7ca

Actual Behavior

WeChat439687c91e2348d09b526bf56607f17b

Environment

  • Angular:17
  • CDK/Material:17
  • Browser(s):Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu):macOS
@mrjihai mrjihai added the needs triage This issue needs to be triaged by the team label Mar 26, 2024
@wagnermaciel wagnermaciel added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent area: material/select and removed needs triage This issue needs to be triaged by the team labels Mar 27, 2024
@wagnermaciel
Copy link
Contributor

I think this might be able to be improved so someone should look into this, but I don't think the correct answer is to expand the menu to be larger than the input. That would probably be a divergence from material design. The more correct approach would probably be to just increase the width of the form field

@msmallest
Copy link

I encountered this sometime between going from a pre-mdc version to v16 using the legacy imports. The width of the form field was constrained in this scenario, and there was edge cases where the option could be quite long. The fix on my end was adding wrapping tooltips to the options. That said, I would vouch for this to be something to be considered if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/select P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
3 participants