mirror of
https://github.com/ansible/awx.git
synced 2026-01-24 07:51:23 -03:30
Merge pull request #6644 from jakemcdermott/6638-fix-initial-playbook-value
Only clear playbook when different project is selected Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
e270a692b7
@ -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