You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
If you use a custom component as a form item, this happens if you call onChange before the form fully initialized.
Such as calling onChange property in the componentDidMount of the custom component.
Activity
prajwal-svm commentedon Apr 15, 2021
I'm facing the same issue, any possible solution to this?
patrickjsmirnov commentedon Aug 2, 2021
@Prajwal-S-Venkatesh, did you solve this problem?
buttonfly1000 commentedon Jan 15, 2026
If you use a custom component as a form item, this happens if you call
onChangebefore the form fully initialized.Such as calling
onChangeproperty in thecomponentDidMountof the custom component.