Skip to content

Commit

Permalink
fix: prevent validation error to prevent form dialog from closing
Browse files Browse the repository at this point in the history
  • Loading branch information
Pagebakers committed Jan 30, 2023
1 parent 335acba commit d424898
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/cool-rings-arrive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@saas-ui/modals': patch
'@saas-ui/react': patch
---

Prevent input error in FormDialog to block cancel/close the modal.
4 changes: 2 additions & 2 deletions .changeset/rich-masks-join.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
'@saas-ui/forms': major
'@saas-ui/radio': major
'@saas-ui/forms': patch
'@saas-ui/radio': patch
---

Allow SubmitButton variant to be overwritten.
4 changes: 3 additions & 1 deletion packages/saas-ui-modals/src/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ export const FormDialog = forwardRef(
onChange,
onSubmit,
onError,
mode,
reValidateMode,
shouldFocusError = true,
shouldUnregister,
shouldUseNativeValidation,
criteriaMode,
delayError,
delayError = 100,
cancelLabel,
submitLabel,
footer,
Expand All @@ -94,6 +95,7 @@ export const FormDialog = forwardRef(
onChange,
onSubmit,
onError,
mode,
reValidateMode,
shouldFocusError,
shouldUnregister,
Expand Down

0 comments on commit d424898

Please sign in to comment.