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: 修复表单重置后,页面变化了,表单内部的状态未能及时同步
General
Type
Checklist
场景描述
在使用
useTable
时,需要手动重置form
表单,然后发送异步请求。问题描述
useTable
调用后解构出来的getForm
调用resetFields
未能即时同步页面变化到form
表单内部的状态,就是说——页面发生变化后,resetFields
是异步重置表单的。使用案列
修复前
修复前的

src/components/Form/src/hooks/useForm.ts
调用修复前的

resetFields
showcase: 调用修复前的

resetFields
修复后
修复后的

src/components/Form/src/hooks/useForm.ts
调用修复后的

resetFields
showcase: 调用修复后的

resetFields