From 81709a124b3c191cb4268b0050c6d418e64ccbec Mon Sep 17 00:00:00 2001 From: Oliver Dudgeon <22367286+OliverDudgeon@users.noreply.github.com> Date: Tue, 5 Mar 2024 22:38:38 +0000 Subject: [PATCH] fix(run-job): fix run job button when job has no options Fixes #1257 --- components/runCards/JobCard/JobModal.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/runCards/JobCard/JobModal.tsx b/components/runCards/JobCard/JobModal.tsx index 0b77836ec..4900bc168 100644 --- a/components/runCards/JobCard/JobModal.tsx +++ b/components/runCards/JobCard/JobModal.tsx @@ -169,7 +169,10 @@ export const JobModal = ({ DialogProps={{ maxWidth: "md", fullWidth: true }} id={`job-${jobId}`} open={open} - submitDisabled={!formRef.current?.validateForm() || !inputsValid} + submitDisabled={ + (formRef.current?.validateForm() !== undefined && !formRef.current?.validateForm()) || + !inputsValid + } submitText="Run" title={job?.name ?? "Run Job"} onClose={onClose}