-
-
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: the month and year cannot be switched after the datepicker is rendered in Calendar #535
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 #535 +/- ##
=======================================
Coverage 99.32% 99.33%
=======================================
Files 49 49
Lines 2236 2246 +10
Branches 652 653 +1
=======================================
+ Hits 2221 2231 +10
Misses 13 13
Partials 2 2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Vercel 的CI忽略它 |
好的 明白了 |
…ndered in Calendar
07dbc62
to
dfbe7bd
Compare
@afc163 帮忙再看下这次代码可以么 |
@zombieJ 看看 |
@@ -334,8 +336,9 @@ function PickerPanel<DateType>(props: PickerPanelProps<DateType>) { | |||
|
|||
// ============================ Effect ============================ | |||
React.useEffect(() => { | |||
if (value && !initRef.current) { | |||
if (value && !isEqual(generateConfig, value, originalValue.current) && !initRef.current) { |
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.
这个 value object 变化重置是 by design,做 date 判断反而是非预期的。我去那边评论一下~
修复ant design 中 Calendar 内渲染 Datepicker 后无法切换月份年份的问题。
fix ant-design/ant-design#38731