Skip to content

[Select] Auto Width title get cropped if longer than input value #45276

@TheOneTheOnlyJJ

Description

@TheOneTheOnlyJJ

Steps to reproduce

Steps:

  1. Open this link to live example: Take the current Auto Width Code Sandbox
  2. Replace the "Age" value of the InputLabel and the Select's label prop with "A Longer Title Than Usual"
  3. Notice the effects of the change on the component

Current behavior

Image
Image

Notice how the input label (title) gets cropped, both when it acts as content and when it is rendered above the actual input's content.

Expected behavior

The entire Select should be wide enough to fit the Title, even if the content is shorter.
The final width of the Select should be max(inputWidth, titleWidth). Right now, it appears to only be based on inputWidth.

Context

This issue is a continuation of rjsf-team/react-jsonschema-form#4484.
Finding a solution here will also fix that one.

Your environment

No response

Search keywords: select title crop too long fit length style styling input value

Metadata

Metadata

Labels

ready to takeHelp wanted. Guidance available. There is a high chance the change will be acceptedscope: selectChanges related to the select.type: enhancementIt’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions