diff --git a/.changeset/cool-rings-arrive.md b/.changeset/cool-rings-arrive.md new file mode 100644 index 000000000..32b93c3da --- /dev/null +++ b/.changeset/cool-rings-arrive.md @@ -0,0 +1,6 @@ +--- +'@saas-ui/modals': patch +'@saas-ui/react': patch +--- + +Prevent input error in FormDialog to block cancel/close the modal. diff --git a/.changeset/rich-masks-join.md b/.changeset/rich-masks-join.md index eaec1b7dc..e33b34656 100644 --- a/.changeset/rich-masks-join.md +++ b/.changeset/rich-masks-join.md @@ -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. diff --git a/packages/saas-ui-modals/src/form.tsx b/packages/saas-ui-modals/src/form.tsx index 35623b907..54e6919fa 100644 --- a/packages/saas-ui-modals/src/form.tsx +++ b/packages/saas-ui-modals/src/form.tsx @@ -72,12 +72,13 @@ export const FormDialog = forwardRef( onChange, onSubmit, onError, + mode, reValidateMode, shouldFocusError = true, shouldUnregister, shouldUseNativeValidation, criteriaMode, - delayError, + delayError = 100, cancelLabel, submitLabel, footer, @@ -94,6 +95,7 @@ export const FormDialog = forwardRef( onChange, onSubmit, onError, + mode, reValidateMode, shouldFocusError, shouldUnregister,