1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Prevent project lookup from firing requests on every render

This commit is contained in:
Marliana Lara 2020-04-06 16:50:10 -04:00
parent 735d44816b
commit c2ba495824
No known key found for this signature in database
GPG Key ID: 38C73B40DFA809EE

View File

@ -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({
/>
<PlaybookSelect
projectId={project?.id || projectField.value?.id}
isValid={!(playbookMeta.touched || playbookMeta.error)}
isValid={!playbookMeta.touched || !playbookMeta.error}
field={playbookField}
onBlur={() => playbookHelpers.setTouched()}
onError={setContentError}