Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(hoverPlaceholder): optmize logic when value is not empty #109

Merged
merged 4 commits into from
Jul 27, 2020
Merged

chore(hoverPlaceholder): optmize logic when value is not empty #109

merged 4 commits into from
Jul 27, 2020

Conversation

kerm1it
Copy link
Member

@kerm1it kerm1it commented Jul 24, 2020

#25050

@afc163 看看是不是这种效果?

@zombieJ 优化了有值是的情况,悬停时输入框的值变为对应日期,样式变为 placeholder的样式,离开后恢复原值。

@vercel
Copy link

vercel bot commented Jul 24, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/picker/eg679ptnj
✅ Preview: https://picker-git-fork-kermit-xuan-feat-25050.react-component.vercel.app

@codecov
Copy link

codecov bot commented Jul 24, 2020

Codecov Report

Merging #109 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #109   +/-   ##
=======================================
  Coverage   99.58%   99.58%           
=======================================
  Files          44       44           
  Lines        1920     1924    +4     
  Branches      575      584    +9     
=======================================
+ Hits         1912     1916    +4     
  Misses          6        6           
  Partials        2        2           
Impacted Files Coverage Δ
src/Picker.tsx 100.00% <100.00%> (ø)
src/RangePicker.tsx 100.00% <100.00%> (ø)
src/hooks/useHoverValue.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1a20a8...d1262f4. Read the comment docs.

src/Picker.tsx Outdated Show resolved Hide resolved
@kerm1it
Copy link
Member Author

kerm1it commented Jul 25, 2020

重构了一下,其实已经和 placeholder 没有关系了,hover 时的样式那的类名还是叫 placeholder。

@kerm1it kerm1it requested a review from zombieJ July 27, 2020 00:59
@zombieJ zombieJ merged commit ca9e814 into react-component:master Jul 27, 2020
@zombieJ
Copy link
Member

zombieJ commented Jul 27, 2020

+ [email protected]

@afc163
Copy link
Member

afc163 commented Sep 7, 2020

在 Firefox 下选择时,第一个和第二个日期都会有灰色和黑色的短暂跳动。

Chrome 下很流畅,看不出来。

2020-09-07 18-22-35 2020-09-07 18_23_03

@kerm1it
Copy link
Member Author

kerm1it commented Sep 7, 2020

需要给事件加个防抖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants