question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dismissing submission error

See original GitHub issue

I’d like to dismiss the global submission error that’s being set with: throw new SubmissionError({ _error: 'Server is having a bad day :(' }) I have a typical x button inside the error msg with an action attached to it However Neither dispatch(stopSubmit({})) nor dispatch(clearSubmitErrors({})) change the error prop or the submitFail prop redux form v6.6.3 Thanx

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
szerintedmicommented, Aug 14, 2017

Indeed it does clear error now but it seems that it still not resets submitFailed flag.

4reactions
mostafa-drzcommented, Oct 26, 2018

Based on the circumstances, this solution would work. My requirement was to reset submitFailed to false after the form changes, I couldn’t find anything on the docs, but stopSubmit is doing the job for me. You can dispatch the stopSubmit in form change and then it’s gonna make the submitFailed false.

CartForm = reduxForm({
  form: 'cart',
  validate: validateCart,
  destroyOnUnmount: false,
  onChange: (values, dispatch, props) => {
    if (props.submitFailed) {
      dispatch(stopSubmit('cart'));
    }
  }
})(CartForm); 

I think it is handy if we have a way to reset the submitFailed flag directly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Preserving Error When Amending a Complaint after Claims ...
However, what may be unclear for many attorneys is how to preserve error when amending a complaint after some claims have been dismissed....
Read more >
Dismiss and un-dismiss results - Pope Tech Help Center
Errors and alerts that have been reviewed and aren't an accessibility issue can be dismissed. Once dismissed, they won't show up in the...
Read more >
Error dismissing ImagePickerController - Apple Developer
I think the error occurs at the line, "self. dismiss(animated: false, completion: nil)", where self is the main ViewController.
Read more >
227.1 Motion to Dismiss: Insufficient Evidence - NC PRO
The defendant's motion to dismiss for insufficient evidence challenges whether there is substantial evidence of each element of the offense ...
Read more >
How to Report Errors in Forms: 10 Design Guidelines
These guidelines need little explanation: first, if users don't know that there is a problem with their input, they won't be able to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found