JedWatson / JedWatson/react-select
search value reset's on item select from dropdown
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
Are you reporting a bug or runtime error?
Bug
The following CSB link can be used to reproduce the issue or at least the behavior.
https://codesandbox.io/s/react-select-v5-sandbox-y5jtm
Steps to reproduce
- Type in some text to search.
- user observes 3-4 items from search results.
- user selects one item from the results
- the search keyword disappears
- dropdown items reset
Expected result
Upon selecting an item from the search results, the search keyword and search result should persist so the user doesn't have to click, type, select again from the list
Are there any props or tricks in callbacks that can help retain search keywords and search results after the user selects an item from the dropdown?
Contributor guide
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 behavior in the linked CodeSandbox: type a search term, select a result, and observe the cleared keyword and reset options. Trace the React Select selection and search-input behavior to determine how the search state is handled. Done means selecting an item preserves the search keyword and displayed results as described.
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
- 45/100