diff --git a/src/main/frontend/src/components/CreateLoanDialog.tsx b/src/main/frontend/src/components/CreateLoanDialog.tsx index 747934b..51e1bd1 100644 --- a/src/main/frontend/src/components/CreateLoanDialog.tsx +++ b/src/main/frontend/src/components/CreateLoanDialog.tsx @@ -32,6 +32,8 @@ const formSchema = z.object({ }); function CreateLoanDialog() { + const [accountPopOverOpen, setAccountPopOverOpen] = useState(false); + const form = useForm>({ resolver: zodResolver(formSchema), defaultValues: { @@ -97,7 +99,7 @@ function CreateLoanDialog() { render={({field}) => ( Account Id - + - + ( form.setValue("id", account?.id)} + onSelect={() => { + form.setValue("id", account?.id); + setAccountPopOverOpen(false); + }} value={account?.phoneNumber + "|" + account?.email} > {account?.email}