From d54586fbfea3084b6f4952a7ed6bded1c97cc39b Mon Sep 17 00:00:00 2001 From: Jeff Sieu Date: Tue, 8 Nov 2022 01:28:08 +0800 Subject: [PATCH] [questions][fix] disallow unnamed lists --- apps/portal/src/components/questions/CreateListDialog.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/portal/src/components/questions/CreateListDialog.tsx b/apps/portal/src/components/questions/CreateListDialog.tsx index fcd22395..c02e06bd 100644 --- a/apps/portal/src/components/questions/CreateListDialog.tsx +++ b/apps/portal/src/components/questions/CreateListDialog.tsx @@ -21,7 +21,7 @@ export default function CreateListDialog({ const { register: formRegister, handleSubmit, - formState: { isSubmitting }, + formState: { isSubmitting, isDirty }, reset, } = useForm(); const register = useFormRegister(formRegister); @@ -51,6 +51,7 @@ export default function CreateListDialog({ autoComplete="off" label="Name" placeholder="List name" + required={true} type="text" /> @@ -62,6 +63,7 @@ export default function CreateListDialog({ onClick={handleDialogCancel} />