react-component / react-component/picker

defaultPickerValue is not working

Open
#155 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
304
Forks
345
Avg merge
2d 7h
Merged PRs (30d)
7

Description

Reproduction link

https://codesandbox.io/s/rc-picker-playground-870j6?file=/src/App.tsx

Steps to reproduce

Pass defaultPickerValue only to Picker component is not working. (not with defaultValue)

What is expected?

Pass defaultPickerValue only to Picker component is working.

What is actually happening?

Pass the same value to defaultPickerValue and defaultValue in Picker component is working.
But pass only defaultPickerValue would not work.

Environment Info
moment 2.29.1
React 16.13.1
rc-picker 2.3.0
rc-utils 5.4.0

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 with the reproduction in src/App.tsx and the Picker component behavior shown in the CodeSandbox. Trace how defaultPickerValue is handled when defaultValue is absent, then verify that the expected picker state works with only defaultPickerValue.

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.