-
-
Notifications
You must be signed in to change notification settings - Fork 318
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
fix: solve animation jitter when input area less width than picker panel issue #665
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov Report
@@ Coverage Diff @@
## master #665 +/- ##
=======================================
Coverage 99.05% 99.05%
=======================================
Files 56 56
Lines 2430 2432 +2
Branches 734 735 +1
=======================================
+ Hits 2407 2409 +2
Misses 21 21
Partials 2 2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -1807,7 +1807,7 @@ describe('Picker.Range', () => { | |||
} else if (this.className.includes('panel-container')) { | |||
return 311; | |||
} else if (this.className.includes('input')) { | |||
return 285; | |||
return 306; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
实际上模拟的应该是 arrowLeft < panelWidth, 而 arrowLeft + arrowWidth > panelWidth。
arrowLeft = inputWidth + separatorWidth
这里条件不符合
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
新加的条件是 inputWidth * 2 + separator > panelWidth * 2
换算一下是 inputWidth + separator / 2 > panelWidth,与 inputWidth + separator < panelWidth 矛盾了
所以条件可以重新考虑一下
close ant-design/ant-design#44177