-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
fix: solve the error about setFieldValue array & pref the code #3775
fix: solve the error about setFieldValue array & pref the code #3775
Conversation
Hello. Will this modification affect other functionalities and behavior, as it seems that you have removed core functions from the "useFormEvents" hook? |
Probably not, because the original purpose of this code is to get the key valve on the object or array 's path, such as "a.b.c", but this has a problem, such as "a[0]" code it does not recognize(#3774). So here I use Lodash's And elsewhere in vben-admin, using Lodash get and set also seems to be a common behavior。 |
Thank you for the explanation 😃 |
这个代码导致我之前所有的 类似 field: '[startTime, endTime]', 这种setFieldsValue 赋值不了了 开始时间:在用户端上架展示该活动,不代表报名时间; 结束时间:在用户端下架该活动,不再展示; ), }, required: true, }, ], showActionButtonGroup: false, }); setFieldsValue({ |
@electroluxcode @doraemonxxx 希望能解决下 |
Hi, can you please pull the latest revisions? I think it should be fixed in commit 88e77db |
I think you should use |
Still can't do it , I used setFieldsValue before when editing detailed data |
my fault,确实没考虑一个表单项传递复数值的情况,可以先提一个issue,一会儿我会看看怎么修复 |
|
I see, you are setting the value not resetting. for now the workaround for that issue is to revert the latest code to the original one. you can just copy or use old one and replace the new one from this website. go to Files changed |
fix #3774 & pref the code