From c2ba4958246c001312338ebc5b448f31680abd1f Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Mon, 6 Apr 2020 16:50:10 -0400 Subject: [PATCH] Prevent project lookup from firing requests on every render --- awx/ui_next/src/screens/Template/shared/JobTemplateForm.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/awx/ui_next/src/screens/Template/shared/JobTemplateForm.jsx b/awx/ui_next/src/screens/Template/shared/JobTemplateForm.jsx index 9e2b0ae0ce..531809062b 100644 --- a/awx/ui_next/src/screens/Template/shared/JobTemplateForm.jsx +++ b/awx/ui_next/src/screens/Template/shared/JobTemplateForm.jsx @@ -103,6 +103,7 @@ function JobTemplateForm({ } }, [template, validateField]) ); + const { request: loadRelatedInstanceGroups, error: instanceGroupError, @@ -143,7 +144,7 @@ function JobTemplateForm({ playbookHelpers.setValue(0); scmHelpers.setValue(''); }, - [setProject, projectHelpers, playbookHelpers, scmHelpers] + [] // eslint-disable-line react-hooks/exhaustive-deps ); const jobTypeOptions = [ @@ -289,7 +290,7 @@ function JobTemplateForm({ /> playbookHelpers.setTouched()} onError={setContentError}