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

表单组件设置值时,遇到null时报错 #153

Closed
1 task
904534675 opened this issue Sep 3, 2018 · 4 comments
Closed
1 task

表单组件设置值时,遇到null时报错 #153

904534675 opened this issue Sep 3, 2018 · 4 comments

Comments

@904534675
Copy link

904534675 commented Sep 3, 2018

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.0.3

Environment

1.0.3

Reproduction link

Edit on CodeSandbox

Steps to reproduce

后台返回的数据在form中没有对应的item的情况,如下:
formdata:{'name':'zhangsan','age':17,'guid':null}
(后台返回的数据比较多,有些项目不需要展示出来)
这时表单中没有GUID这一项,用这个数据调用 setFieldsValue 时报错
错误信息: Cannot convert undefined or null to object"

What is expected?

麻烦处理一下null值,按空值处理

What is actually happening?

报错,form不能正常显示出来数据

@tangjinzhou
Copy link
Member

麻烦给出复现链接

@904534675
Copy link
Author

复现链接:https://codesandbox.io/s/jlp6yz8nj5

@tangjinzhou
Copy link
Member

please update to 1.1.0

@lock
Copy link

lock bot commented Sep 11, 2019

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants