react-component / react-component/select

Disabling autoClearSearchValue for single select

Open
#654 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

Hi, I was digging into Select component and found this:

https://github.com/react-component/select/blob/9b2fa1da18505e234efe1f94d53a2e87a614980d/src/generate.tsx#L637-L640

I really need to disable clearing inputValue on opening popup, but autoClearSearchValue={false} not working with single select mode. Am I right if !isMultiple would be removed, than it would allow us to persist inputValue?

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 in src/generate.tsx at the linked lines around 637-640 and trace how autoClearSearchValue is applied when opening the popup. Done means autoClearSearchValue={false} preserves inputValue for single-select mode as well as multiple-select mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.