fix: appeared again after closing and disappeared very quickly#39
Merged
zombieJ merged 4 commits intoreact-component:masterfrom Jan 9, 2023
Merged
fix: appeared again after closing and disappeared very quickly#39zombieJ merged 4 commits intoreact-component:masterfrom
zombieJ merged 4 commits intoreact-component:masterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
zombieJ
reviewed
Jan 9, 2023
tests/CSSMotion.spec.tsx
Outdated
| motionName="transition" | ||
| visible={visible} | ||
| removeOnLeave={false} | ||
| leavedClassName={'removed'} |
Member
There was a problem hiding this comment.
这边设置 leavedClassName 后,下面测试需要移除掉 leavedClassName 才能测出上面的逻辑。
Codecov Report
@@ Coverage Diff @@
## master #39 +/- ##
=======================================
Coverage 98.38% 98.38%
=======================================
Files 11 11
Lines 371 371
Branches 106 106
=======================================
Hits 365 365
Misses 6 6
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
heiyu4585
commented
Jan 9, 2023
| setNodeRef, | ||
| ); | ||
| } else if (forceRender) { | ||
| } else if ( forceRender || (!removeOnLeave && !leavedClassName)) { |
Contributor
Author
There was a problem hiding this comment.
!removeOnLeave 的情况因为没有 leavedCLassName 会走到最后的 motionChildren = null 分支, 在forceRender 加上(!removeOnLeave && !leavedClassName) 兜底变成 style 注入,覆盖到 !removeOnleave的情况.
|
低配置机型开启cpu 六倍降速还是会偶现关闭Modal出现闪动问题。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix ant-design/ant-design#39013
bug复现方法:
