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 the error prop with a ValidatedForm, ValidatedQuickForm and AutoForm, an uncaught promise error is logged to the console whenever the model is validated after a submit (such as when manipulating model data).
The problem seems to lie in ValidatedForm.onValidateModel. Whenever the error prop is set or schema validation throws, it inevitably leads the returned promise to reject , and both calls to this.onValidate() and this.onValidateModel() in componentWillReceiveProps are unhandled, causing the console error.
Hi @idmadj - good catch! Well, indeed, componentWillReceiveProps is not handling it at all. Maybe it's a good idea to silent it, just like in #onSubmit. Maybe you'd like to submit a PR for it?
idmadj
added a commit
to idmadj/uniforms
that referenced
this issue
Sep 26, 2018
When using the
error
prop with aValidatedForm
,ValidatedQuickForm
andAutoForm
, an uncaught promise error is logged to the console whenever the model is validated after a submit (such as when manipulating model data).Demo: https://codesandbox.io/s/lx4rz1001q
The problem seems to lie in
ValidatedForm.onValidateModel
. Whenever theerror
prop is set or schema validation throws, it inevitably leads the returned promise to reject , and both calls tothis.onValidate()
andthis.onValidateModel()
incomponentWillReceiveProps
are unhandled, causing the console error.The text was updated successfully, but these errors were encountered: