react-component / react-component/picker

[Question/Bug] Defocus click behaviour change between versions 2.5.2 and >2.5.2

Open
#276 4 comments 3 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

Hi,

There's a behaviour change between vs 2.5.2 and beyond.

Demonstrated in https://codesandbox.io/s/gifted-grass-cejvh?file=/src/App.tsx (which allows version toggle of rc-picker).

With the following picker:
image

In 2.5.2:
Change the date from 2021-05-27 to another valid date via keyboard input (e.g. 2021-05-28)
Click outside of picker
Date stays as 2021-05-28

Beyond 2.5.2:
Change the date from 2021-05-27 to another valid date via keyboard input (e.g. 2021-05-28)
Click outside of picker
Date resets to 2021-05-27

Is this change intentional? 2.5.2 behavior is preferable for our use case.

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 linked CodeSandbox and reproduce the keyboard-edit-then-defocus flow while toggling rc-picker versions 2.5.2 and later. Trace the picker’s outside-click and keyboard-input handling to identify where the entered date is discarded. Done means determining whether the change is intentional or restoring the demonstrated 2.5.2 behavior, with a regression test if the repository’s tests cover this flow.

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.