react-component / react-component/select
When `showSearch={true}` and `defaultActiveFirstOption={false}`, pressing ArrowUp makes the second-to-last option active
Open
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
- 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 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