Skip to content
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

setFieldsValue 后getFieldsValue会获取到非 form结构的数据(After using setFieldsValue, calling getFieldsValue will retrieve the values, including those that are not part of the form structure.) #601

Open
Now-Sprouting opened this issue Jul 5, 2023 · 0 comments

Comments

@Now-Sprouting
Copy link

当setFieldsValue设置回显值的时候,设置了数组结构中不存在的元素,在稍后的提交中这个多的元素还会存在,非数组结构就没有这个问题。
When using setFieldsValue to set the initial values for form fields, if you include an element that does not exist in the original data structure of an array, this extra element will still persist during subsequent form submissions. However, with non-array data structures, this issue does not occur.

demo:https://codesandbox.io/s/frosty-star-7h3x97?file=/App.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant