JedWatson / JedWatson/react-select
Select does not display options initially when filterOption prop is specified
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
Version 3.2.0 seemed to introduce an issue where options are not displayed when there is not input value and the filterOption prop is present. This worked fine in version 3.1.1
Working example
https://codesandbox.io/s/311-working-301yt
Nonworking example
https://codesandbox.io/s/320-not-working-ibgc7?file=/example.js:389-445
To reproduce, click the select in both examples and notice that options are only displayed in the 3.1.1 example. Options are however rendered when there is an input present in the 3.2.0 example.
Thanks!
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 comparing the 3.1.1 working CodeSandbox with the 3.2.0 nonworking example and trace the Select filtering path when filterOption is set and the input is empty. Reproduce the behavior by clicking each select; done means the 3.2.0 behavior displays its options initially without requiring input.
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