react-component / react-component/select

When `showSearch={true}` and `defaultActiveFirstOption={false}`, pressing ArrowUp makes the second-to-last option active

Open
#680 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
938
Forks
482
Avg merge
15h 8m
Merged PRs (30d)
2

Description

If you have the following code:

<Select showSearch defaultActiveFirstOption={false}>
  <Select.Option value="a">A</Select.Option>
  <Select.Option value="b">B</Select.Option>
  <Select.Option value="c">C</Select.Option>
</Select>

And you start typing in the input field, pressing ArrowUp makes B active, not C.

Contributor guide

No contributing guide indexed for this repository

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 reproducing the supplied Select example with showSearch and defaultActiveFirstOption={false}, then trace the keyboard handling for ArrowUp and the active option calculation. Add a regression test showing that typing followed by ArrowUp activates C rather than B, and confirm the existing keyboard-navigation tests still pass.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.