react-component / react-component/select

Popup alignment is broken, when dropdownMatchSelectWidth is set to false

Open
#679 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.