diff --git a/src/dispatch/static/dispatch/src/case/priority/CasePrioritySelect.vue b/src/dispatch/static/dispatch/src/case/priority/CasePrioritySelect.vue index fba5cba04eba..ecbc78c6b2dd 100644 --- a/src/dispatch/static/dispatch/src/case/priority/CasePrioritySelect.vue +++ b/src/dispatch/static/dispatch/src/case/priority/CasePrioritySelect.vue @@ -143,9 +143,15 @@ export default { project: { handler(newProject) { if (newProject?.id !== this.lastProjectId) { - this.lastProjectId = newProject?.id - this.resetSelection() - this.fetchData() + // Check if we're moving to a valid project (not null) + if (this.lastProjectId) { + this.lastProjectId = newProject.id + this.resetSelection() + this.fetchData() + } else { + // If new project is null/undefined, just update lastProjectId + this.lastProjectId = null + } } this.validatePriority() }, diff --git a/src/dispatch/static/dispatch/src/case/type/CaseTypeSelect.vue b/src/dispatch/static/dispatch/src/case/type/CaseTypeSelect.vue index 34f8df53e7cf..ce9693799055 100644 --- a/src/dispatch/static/dispatch/src/case/type/CaseTypeSelect.vue +++ b/src/dispatch/static/dispatch/src/case/type/CaseTypeSelect.vue @@ -172,9 +172,15 @@ export default { project: { handler(newProject) { if (newProject?.id !== this.lastProjectId) { - this.lastProjectId = newProject?.id - this.resetSelection() - this.fetchData() + // Check if we're moving to a valid project (not null) + if (this.lastProjectId) { + this.lastProjectId = newProject.id + this.resetSelection() + this.fetchData() + } else { + // If new project is null/undefined, just update lastProjectId + this.lastProjectId = null + } } this.validateType() }, diff --git a/src/dispatch/static/dispatch/src/incident/priority/IncidentPrioritySelect.vue b/src/dispatch/static/dispatch/src/incident/priority/IncidentPrioritySelect.vue index 08ab2d6e0270..9feb7e5e4353 100644 --- a/src/dispatch/static/dispatch/src/incident/priority/IncidentPrioritySelect.vue +++ b/src/dispatch/static/dispatch/src/incident/priority/IncidentPrioritySelect.vue @@ -133,10 +133,17 @@ export default { project: { handler(newProject) { if (newProject?.id !== this.lastProjectId) { - this.lastProjectId = newProject?.id - this.resetSelection() - this.fetchData() + // Check if we're moving to a valid project (not null) + if (this.lastProjectId) { + this.lastProjectId = newProject.id + this.resetSelection() + this.fetchData() + } else { + // If new project is null/undefined, just update lastProjectId + this.lastProjectId = null + } } + this.validatePriority() }, deep: true, diff --git a/src/dispatch/static/dispatch/src/incident/type/IncidentTypeSelect.vue b/src/dispatch/static/dispatch/src/incident/type/IncidentTypeSelect.vue index e7e8c62c3d51..5040af7002bb 100644 --- a/src/dispatch/static/dispatch/src/incident/type/IncidentTypeSelect.vue +++ b/src/dispatch/static/dispatch/src/incident/type/IncidentTypeSelect.vue @@ -86,9 +86,15 @@ export default { project: { handler(newProject) { if (newProject?.id !== this.lastProjectId) { - this.lastProjectId = newProject?.id - this.clearSelection() - this.fetchData() + // Check if we're moving to a valid project (not null) + if (this.lastProjectId) { + this.lastProjectId = newProject.id + this.resetSelection() + this.fetchData() + } else { + // If new project is null/undefined, just update lastProjectId + this.lastProjectId = null + } } }, },