form icon indicating copy to clipboard operation
form copied to clipboard

resetFields and setFieldsValue is not working when trigger is set to onBlur

Open 1064774 opened this issue 3 years ago • 4 comments

I am using antd 3.x It's default behavior of form is onChange which is downgrading the Form performance. For now, I cannot switch to Antd 4.x.

I am passing this fieldOptions to form

const fieldOptions = { trigger: 'onBlur', valuePropName: 'defaultValue', rules: validationRules(isRequired, vRules), validateFirst: true, };

It is not doing setFieldsValue or resetFields when trigger is set to onBlur.

1064774 avatar Jul 31 '20 14:07 1064774

antd 3.x is no longer maintained. the problem won't be fixed in 3.x version

07akioni avatar Aug 02 '20 15:08 07akioni

I noticed that field values are getting changed into form but not getting displayed on form. Any workaround for this? @07akioni

1064774 avatar Aug 03 '20 05:08 1064774

antd 3.x is no longer maintained. the problem won't be fixed in 3.x version

Yes - Seems, most of the issues with 3.x is fixed in 4.x

Can you let me know, if I am able to use only 4.x form with 3.x version and how?

1064774 avatar Aug 03 '20 06:08 1064774

antd 3.x is no longer maintained. the problem won't be fixed in 3.x version

Yes - Seems, most of the issues with 3.x is fixed in 4.x

Can you let me know, if I am able to use only 4.x form with 3.x version and how?

Maybe you can try babel-import-plugin documented at antd's site. however i'm not sure it will work. it won't be a trivial work.

07akioni avatar Aug 04 '20 07:08 07akioni