-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
feat: support clearOnDestroy #692
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #692 +/- ##
=======================================
Coverage 99.43% 99.43%
=======================================
Files 18 18
Lines 1247 1249 +2
Branches 304 305 +1
=======================================
+ Hits 1240 1242 +2
Misses 7 7 ☔ View full report in Codecov by Sentry. |
@@ -165,6 +165,10 @@ export class FormStore { | |||
}); | |||
|
|||
this.prevWithoutPreserves = prevWithoutPreserves; | |||
if (clearStoreOnDestroy) { | |||
// destroy form reset store | |||
this.updateStore({}); |
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.
这里不需要回到 initialValues 么?
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.
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.
不太明白,就是有 initialValues,然后我卸载了,在 Mount。这个 store 里没有 initialValues?
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.
clearStoreOnDestroy 的目标是 Form 卸载清空 store,还是恢复 initialValues?
No description provided.