JedWatson / JedWatson/react-select
Menu not closing on multi with ValueContainer and controlled inputs
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
I need to display the number of selected fields on the select. I found the way to manage it by using the ValueContainer component. However, the menu does not close when clicking outside of it as it is supposed to do. I also don't want to close on select the option.
Look at the uploaded simple example
https://codesandbox.io/p/sandbox/react-select-v5-sandbox-forked-qtcjqm?file=%2Fexample.tsx
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 example in example.tsx and reproduce the controlled-input setup using ValueContainer. Check the outside-click handling while keeping option selection from closing the menu; done means clicking outside closes it without changing the requested selection behavior.
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