-
-
Notifications
You must be signed in to change notification settings - Fork 50.5k
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: Form.List nest warning #22575
fix: Form.List nest warning #22575
Conversation
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.
Could you please add tests to make sure this change works as expected?
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit cf337ee:
|
Codecov Report
@@ Coverage Diff @@
## master #22575 +/- ##
==========================================
- Coverage 98.16% 98.12% -0.05%
==========================================
Files 306 306
Lines 7072 7076 +4
Branches 1945 1900 -45
==========================================
+ Hits 6942 6943 +1
- Misses 130 133 +3
Continue to review full report at Codecov.
|
|
||
React.useEffect( | ||
() => () => { | ||
destroyRef.current = true; |
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.
这个感觉只是 workaround,副作用没有卸载干净才是原因?
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.
noStyle
里在 useEffect 的 clean up 里会额外调用一次来清除 Field 的信息,但是如果是整个 Form 都移除了,那这次 cleanup 的 update 就作用到 unmounted FormItem 上了。
🤔 This is a ...
🔗 Related issue link
resolve #22544
💡 Background and solution
📝 Changelog
☑️ Self Check before Merge