JedWatson / JedWatson/react-select

Clear selected value requires 2 clicks instead of 1 when enabling "menuShouldBlockScroll"

Open
#5,728 0 comments 1 reaction 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

Hey :)
I am unable to clear values when the menu is open and "menuShouldBlockScroll" is enabled

it requires 2 clicks to remove value instead of a single click

  1. Open The select and choose a value
  2. Click On the "X" to remove the value

As a result, the menu is closed and I need to do one more click to remove the value

To reproduce just need to enable
"menuShouldBlockScroll" and "isClearable"

See this example

Code Sandbox Of The Issue

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 and reproduce the issue with both menuShouldBlockScroll and isClearable enabled. Trace the select's handling of the clear-value click while the menu is open; done means clicking the X once closes or preserves the menu as appropriate and removes the selected value immediately.

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
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.