From 9b423cea4b72a98096e716d2a3b92ca3ead0b3b3 Mon Sep 17 00:00:00 2001 From: Dakshesh Jain <65905942+dakshesh14@users.noreply.github.com> Date: Tue, 18 Jul 2023 12:08:22 +0530 Subject: [PATCH] fix: create workspace valid (#1535) show alert on-change rather then on-submit --- apps/app/components/workspace/create-workspace-form.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/components/workspace/create-workspace-form.tsx b/apps/app/components/workspace/create-workspace-form.tsx index 695962d2f..7a3c12b6e 100644 --- a/apps/app/components/workspace/create-workspace-form.tsx +++ b/apps/app/components/workspace/create-workspace-form.tsx @@ -62,7 +62,7 @@ export const CreateWorkspaceForm: React.FC = ({ setValue, getValues, formState: { errors, isSubmitting }, - } = useForm({ defaultValues }); + } = useForm({ defaultValues, mode: "onChange" }); const handleCreateWorkspace = async (formData: IWorkspace) => { await workspaceService