We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
一个表单项定义了值变化的方法
componentProps: ({ formModel, formActionType }) => { return { onChange: (e: ChangeEvent) => { console.log(` e ----> `, e) }, }; },
当使用了表单的setFieldsValue方法设置性值为null时,此定义了方法的表单项方法会获取到一个null的值,以下是导致此bug的代码
if (_props?.onChange) { _props?.onChange(fieldValue); }
表单项变化的事件其中参数不应该是表单项吗,而在setFieldsValue中参数变成了值,参数不应该设为一致吗?
The text was updated successfully, but these errors were encountered:
@gavin-james 建议fork一下,提供、切个可以重现的分支和示例看看呗。
Sorry, something went wrong.
@xachary 实际情况是定义了onChange方法后,setFieldsValue 改变值,onChange 获取第一个参数的是值,而原本表单改变事件获取到的表单项对象,而值在对象的 target 里,因此出现了,在定义的 onChange 中使用 e.target.value 获取值事出现null的情况
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
No branches or pull requests
一个表单项定义了值变化的方法
当使用了表单的setFieldsValue方法设置性值为null时,此定义了方法的表单项方法会获取到一个null的值,以下是导致此bug的代码
表单项变化的事件其中参数不应该是表单项吗,而在setFieldsValue中参数变成了值,参数不应该设为一致吗?
The text was updated successfully, but these errors were encountered: