JedWatson / JedWatson/react-select

Multiselect menu jumps to the top everytime an option is selected

Open
#3,488 3 comments 12 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hey I'm trying to create a multiselect in v2 and navigate through the options with my arrow keys. Everytime I select an option it jumps back to the top. It doesn't keep the state of the selected value. This is a feature that is in v1 but apparently isn't in v2?

v1 example: https://codesandbox.io/s/ql5y173xx6
v2 example: https://codesandbox.io/s/5wvq595xnn

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 comparing the linked v1 and v2 CodeSandbox examples, then trace the multiselect keyboard-selection behavior in the react-select v2 implementation. Reproduce the jump with arrow-key navigation and confirm that selecting an option preserves the selected value and the menu's current position rather than returning to the top.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.