JedWatson / JedWatson/react-select
react-select does not have a max width when placed inside of a fieldset
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
As soon as I place the react-select component inside of a fieldset, and I start typing something that is too wide for the input, the input gets too wide. When I do this with a react-select component that is not inside of a fieldset, I have no issues at all.
I have played around with widths and max-widths on the different elements within the react-select, but that did not do the trick. The fact that it only happens inside the fieldset makes me think this is a bug.
Here is a test project: https://codesandbox.io/p/sandbox/react-select-fieldset-t7tvk3
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
Start with the linked CodeSandbox reproduction and compare react-select inside and outside a fieldset while typing text wider than the input. Trace the rendered component and its styling to identify why the fieldset case expands. Done means the input stays within its intended width in both contexts, with the reproduction still working.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100