JedWatson / JedWatson/react-select

closeMenuOnSelect "false" is no longer working when isDisabled prop are switched

Open
#4,655 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

awaiting-author-response
Dominant language
TypeScript
Stars
28k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

What's happening (bug?)

When closeMenuOnSelect is set to false and isDisabled is switched to true, the menu is closed : ver 4.3.1.
You can check the behavior by switching the version in the codesandbox below

https://codesandbox.io/s/react-select-playground-forked-l0zv0?file=/src/App.js

I haven't been able to confirm which version broke it, but at least version 3.1.0 is working as intended.

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 by running the linked CodeSandbox and compare the behavior in react-select 4.3.1 with 3.1.0 while toggling isDisabled and using closeMenuOnSelect=false. Trace the menu state change triggered by the disabled prop; done means switching isDisabled to true no longer closes the menu when closeMenuOnSelect is false.

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.