mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Only clear playbook when different project is selected
This commit is contained in:
parent
285e9c2f62
commit
d736adbedc
@ -139,9 +139,13 @@ function JobTemplateForm({
|
||||
|
||||
const handleProjectUpdate = useCallback(
|
||||
newProject => {
|
||||
if (project?.id !== newProject?.id) {
|
||||
// Clear the selected playbook value when a different project is selected or
|
||||
// when the project is deselected.
|
||||
playbookHelpers.setValue(0);
|
||||
}
|
||||
setProject(newProject);
|
||||
projectHelpers.setValue(newProject);
|
||||
playbookHelpers.setValue(0);
|
||||
scmHelpers.setValue('');
|
||||
},
|
||||
[] // eslint-disable-line react-hooks/exhaustive-deps
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user