Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

391
Views
Mantine form, prevent closing mantine modal after submitting

I am writing Form for updating information. Inside submit function I am sending new information to redux-toolkit state. Form is closing after submitting. However, I want to form must be stay open if state return a error message

onSubmit={form.onSubmit(values => {
                            values = {
                                ...values,
                                included_modules: values.included_modules.map((item: any) => {
                                    return { type: item };
                                }),
                            };
                            dispatch(updatePackage({ id: value?.id, values: values }));
                            if (myPackage.showError === true) {
                                setServerError(myPackage.message);
                            } else {
                                setShowModal(false);
                            }
                        })}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can pass following props to mantine modal to prevent it from closing:

  /** Should modal be closed when outside click was registered? */
  closeOnClickOutside: false;
  /** Should modal be closed when escape is pressed? */
  closeOnEscape: false;
  /** Hides close button if set to false, modal still can be closed with escape key and by clicking outside */
  withCloseButton: false;
  /** Should modal be closed when confirm button is pressed */
  closeOnConfirm: false,
  /** Should modal be closed when cancel button is pressed */
  closeOnCancel: false,
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!