react-component / form

React High Order Form Component(web & react-native)
http://react-component.github.io/form/
MIT License
1.81k stars 295 forks source link

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

Open 1064774 opened 4 years ago

1064774 commented 4 years ago

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.

07akioni commented 4 years ago

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

1064774 commented 4 years ago

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

1064774 commented 4 years ago

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?

07akioni commented 4 years ago

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.