JedWatson / JedWatson/react-select

Async Select currently does not interact with defaultValue and defaultInputValue correctly

Open
#3,047 6 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This is because unlike <Creatable/> and the base <Select/> component, we do not wrap AsyncSelect in the StateManager, and in fact wrap the state managed Select in the makeAsyncSelect method.

The defaultValue and defaultInputValue props are still interacting as expected with the wrapped base select, however they are not currently interacting as expected with the wrapping async component.

See an example of this in CodeSandbox.

CC: @JedWatson @jossmac

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 by tracing how AsyncSelect is composed through makeAsyncSelect, StateManager, and the wrapped base Select; use the linked CodeSandbox to reproduce the behavior. Done means defaultValue and defaultInputValue interact with AsyncSelect as expected, consistently with Creatable and the base Select.

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.