[Select] Auto Width title get cropped if longer than input value
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Steps to reproduce
Steps:
- Open this link to live example: Take the current Auto Width Code Sandbox
- Replace the
"Age"value of theInputLabeland the Select'slabelprop with"A Longer Title Than Usual" - Notice the effects of the change on the component
Current behavior
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the problem in the Select documentation's Auto Width example using the linked CodeSandbox and the longer InputLabel and label text. Trace how the Select determines its width, then verify that the rendered control accommodates the longer title as well as shorter content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100