Skip to content

fix: Should reset when motion end#179

Merged
zombieJ merged 2 commits intomasterfrom
fix-motion
May 28, 2021
Merged

fix: Should reset when motion end#179
zombieJ merged 2 commits intomasterfrom
fix-motion

Conversation

@zombieJ
Copy link
Copy Markdown
Member

@zombieJ zombieJ commented May 28, 2021

jest 里模拟不出来动画时机比较蛋疼。简单来说就是 Notice 在触发 close 时,动画进入消失状态。这个时候如果遇到一个一模一样的 key 创建新的元素就会被复用到这个被移除的 Notice 上,导致 Notice 清退被打断。添加一个额外的 visible 判断,如果有变化了。就重置一下。

resolve ant-design/ant-design#30742

@vercel
Copy link
Copy Markdown

vercel bot commented May 28, 2021

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/notification/AhRaCGSShocY9ybabFFEefSPcCK2
✅ Preview: https://notification-git-fix-motion-react-component.vercel.app

@codecov
Copy link
Copy Markdown

codecov bot commented May 28, 2021

Codecov Report

Merging #179 (43517ad) into master (af67623) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #179   +/-   ##
=======================================
  Coverage   98.75%   98.75%           
=======================================
  Files           3        3           
  Lines         160      161    +1     
  Branches       31       32    +1     
=======================================
+ Hits          158      159    +1     
  Misses          2        2           
Impacted Files Coverage Δ
src/Notice.tsx 97.87% <100.00%> (+0.04%) ⬆️
src/Notification.tsx 98.94% <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 af67623...43517ad. Read the comment docs.

@zombieJ zombieJ merged commit f8ada60 into master May 28, 2021
@delete-merged-branch delete-merged-branch bot deleted the fix-motion branch May 28, 2021 14:02
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.

Message doesn't seem to close

1 participant