react-component / react-component/select
Popup alignment is broken, when dropdownMatchSelectWidth is set to false
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 938
- Forks
- 482
- Avg merge
- 15h 8m
- Merged PRs (30d)
- 2
Description
Type of issue: Bug
Minimal reproducible example and workaround:
https://codesandbox.io/s/aged-shadow-3stt5?file=/src/App.js
Here you can see in the code, that the alignment is disabled both, for the "true" and "false" values. But should only be for the "true" value (when dropdown width is exactly the same as the trigger width)
Without workaround
With workaround
Contributor guide
No contributing guide indexed for this repository
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 src/SelectTrigger.tsx at the alignment logic linked in the issue, then reproduce the behavior using the provided CodeSandbox example. Verify that dropdownMatchSelectWidth=false preserves popup alignment while true keeps the dropdown width matched to the trigger, and confirm the reported workaround is no longer needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100