react-component / react-component/picker

Bug: React 18环境下,当鼠标hover Panelbody时input值频繁闪烁

Open
#462 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

Edit on CodeSandbox

Steps to reproduce

打开CodeSendbox重现链接
react 18 环境下(createRoot),single picker 未选中值或值为空时,鼠标hover Panelbody 时input值频繁闪烁复现:
1、safari 15版本,可直接重现;
2、window和mac环境,chrome 打开开发者工具后,hover时会闪烁,关闭后则不会。

看了下源码,有个立即更新的问题:
PanelBody.tsx
106行应当为 onDateMouseLeave(false),非立即更新,可解决闪烁问题。

What is expected?

修复闪烁问题

What is actually happening?

频繁闪烁、体验不佳

Environment Info
antd 4.22.8
React react 18.x
System windows、mac
Browser chrome104、safari 15.x

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 PanelBody.tsx around line 106 and use the linked CodeSandbox reproduction in a React 18 createRoot setup. Check the hover behavior for an empty single picker value in Safari or Chrome with developer tools open; done means the input no longer flashes repeatedly while hovering the panel body.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.