fix: create workspace valid (#1535)

show alert on-change rather then on-submit
This commit is contained in:
Dakshesh Jain 2023-07-18 12:08:22 +05:30 committed by GitHub
parent 9d891ecce1
commit 9b423cea4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ export const CreateWorkspaceForm: React.FC<Props> = ({
setValue,
getValues,
formState: { errors, isSubmitting },
} = useForm<IWorkspace>({ defaultValues });
} = useForm<IWorkspace>({ defaultValues, mode: "onChange" });
const handleCreateWorkspace = async (formData: IWorkspace) => {
await workspaceService