JedWatson / JedWatson/react-select

React Select not working when in a checkbox label

Open
#5,614 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue/bug-unconfirmed
Dominant language
TypeScript
Stars
28k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

Hello and first of all thank you very much for this library, I am trying to use a select in the label of a checkbox but as you can see in the codesandbox the select automatically close and the checkbox is checked instead.

I am not sure if this is because I did something wrong or if I'm missing something.

https://codesandbox.io/s/codesandboxer-example-forked-0wftt5?file=/example.tsx

Thank you in advance!

Contributor guide

Open the contributing guide

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 the linked CodeSandbox reproduction in example.tsx and confirm the select closes and the checkbox becomes checked when the select is used inside the label. Trace the interaction behavior from that example; done means the select remains usable without unexpectedly checking the checkbox.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.