From f438d2ddbf527bfeff4ad74cfd22b8cf2dbd6262 Mon Sep 17 00:00:00 2001 From: Owen Date: Mon, 2 Jun 2025 21:13:57 -0400 Subject: [PATCH] Watch target inputs --- .../settings/resources/[resourceId]/proxy/page.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/app/[orgId]/settings/resources/[resourceId]/proxy/page.tsx b/src/app/[orgId]/settings/resources/[resourceId]/proxy/page.tsx index 714e61bb..8c2365d8 100644 --- a/src/app/[orgId]/settings/resources/[resourceId]/proxy/page.tsx +++ b/src/app/[orgId]/settings/resources/[resourceId]/proxy/page.tsx @@ -163,6 +163,9 @@ export default function ReverseProxyTargets(props: { } as z.infer }); + const watchedIp = addTargetForm.watch("ip"); + const watchedPort = addTargetForm.watch("port"); + const tlsSettingsForm = useForm({ resolver: zodResolver(tlsSettingsSchema), defaultValues: { @@ -818,12 +821,7 @@ export default function ReverseProxyTargets(props: { type="submit" variant="outlinePrimary" className="mt-6" - disabled={ - !( - addTargetForm.getValues("ip") && - addTargetForm.getValues("port") - ) - } + disabled={!(watchedIp && watchedPort)} > Add Target