mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 02:19:58 -03:30
Merge pull request #6624 from marshmalien/6608-project-lookup-bug
Prevent project lookup from firing requests on every render Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
508aed67de
@ -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}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user