JedWatson / JedWatson/react-select

Having `value` be of typeof `"symbol"` crashes

Open
#5,156 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue/bug-unconfirmed
Dominant language
TypeScript
Stars
28k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

Thanks for using react-select!

If you are going to ask a question or want to propose a change or a new feature, then please don't file an issue for this.
Questions and feature requests have their own place in our discussions section.

Are you reporting a bug or runtime error?

runtime error (which I think is a bug, at least in documentation).

https://codesandbox.io/s/react-select-v5-sandbox-forked-wbb4og?file=/example.js

I think that by default the value should not be used for filtering since it is an "implementation detail" of the dropdown.

Contributor guide

Open the contributing guide

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 with the linked CodeSandbox, particularly example.js, and reproduce the runtime error using a value whose typeof is "symbol". Then trace the react-select filtering behavior involved and verify that the crash is resolved while the expected option filtering remains intact.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.