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
Form dynamic setFields Error #21962
Comments
Duplicate of #8880 Don't forget |
并没有解决问题 |
satanYuTeng
changed the title
Form dynamic setFields Error
Form dynamic setFields Error (已关闭但未解决问题)
Mar 7, 2020
satanYuTeng
changed the title
Form dynamic setFields Error (已关闭但未解决问题)
Form dynamic setFields Error
Mar 7, 2020
not work yet codepen.io |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reproduction link
https://3x.ant.design/components/form-cn/#components-form-demo-dynamic-form-item
Steps to reproduce
{getFieldDecorator(
names[${k}]
, {validateTrigger: ['onChange', 'onBlur'],
rules: [
{
required: true,
whitespace: true,
message: "Please input passenger's name or delete this field.",
},
],
this.props.form.setFields({
names:{
value:[1,1],
errors:[new Error('test')]
}
});
对 names 使用 setFields 会报错
Warning: You cannot set a form field before rendering a field associated with the value.
What is expected?
setFields 可以对 数组形式的装饰字段使用
What is actually happening?
对 names 使用 setFields 会报错
Warning: You cannot set a form field before rendering a field associated with the value.
The text was updated successfully, but these errors were encountered: