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:
parent
735d44816b
commit
c2ba495824
@ -103,6 +103,7 @@ function JobTemplateForm({
|
|||||||
}
|
}
|
||||||
}, [template, validateField])
|
}, [template, validateField])
|
||||||
);
|
);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
request: loadRelatedInstanceGroups,
|
request: loadRelatedInstanceGroups,
|
||||||
error: instanceGroupError,
|
error: instanceGroupError,
|
||||||
@ -143,7 +144,7 @@ function JobTemplateForm({
|
|||||||
playbookHelpers.setValue(0);
|
playbookHelpers.setValue(0);
|
||||||
scmHelpers.setValue('');
|
scmHelpers.setValue('');
|
||||||
},
|
},
|
||||||
[setProject, projectHelpers, playbookHelpers, scmHelpers]
|
[] // eslint-disable-line react-hooks/exhaustive-deps
|
||||||
);
|
);
|
||||||
|
|
||||||
const jobTypeOptions = [
|
const jobTypeOptions = [
|
||||||
@ -289,7 +290,7 @@ function JobTemplateForm({
|
|||||||
/>
|
/>
|
||||||
<PlaybookSelect
|
<PlaybookSelect
|
||||||
projectId={project?.id || projectField.value?.id}
|
projectId={project?.id || projectField.value?.id}
|
||||||
isValid={!(playbookMeta.touched || playbookMeta.error)}
|
isValid={!playbookMeta.touched || !playbookMeta.error}
|
||||||
field={playbookField}
|
field={playbookField}
|
||||||
onBlur={() => playbookHelpers.setTouched()}
|
onBlur={() => playbookHelpers.setTouched()}
|
||||||
onError={setContentError}
|
onError={setContentError}
|
||||||
|
Loading…
Reference in New Issue
Block a user