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

Cannot read property 'filter' of undefined #374

Open marcio-alves-deel opened 4 years ago

marcio-alves-deel commented 4 years ago

When using Antd form, I'm getting error with onChange value.

TypeError: Cannot read property 'filter' of undefined
    at Object.getRules (createBaseForm.js:304)
    at createBaseForm.js:444
    at Array.forEach (<anonymous>)
    at Object.validateFieldsInternal (createBaseForm.js:431)
    at Object.onCollectValidate (createBaseForm.js:189)
    at handleChange (PictureUpload.jsx:37)
    at Upload._this.onChange (Upload.js:202)
    at Upload._this.onStart (Upload.js:90)
    at AjaxUploader.js:184

The error started after trying to use the lib with react hooks.

Prajwal-S-Venkatesh commented 3 years ago

I'm facing the same issue, any possible solution to this?

patrickjsmirnov commented 3 years ago

@Prajwal-S-Venkatesh, did you solve this problem?