From 877ee7ff8e95bf4e8206f05a1f3d4fa51c4d3aac Mon Sep 17 00:00:00 2001 From: nhertz <nhertz@nrao.edu> Date: Wed, 17 Nov 2021 11:39:12 -0700 Subject: [PATCH] Latest version now updates in real-time again; other versions do not --- .../capability-request/capability-request.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/web/src/app/workspaces/components/capability-request/capability-request.component.ts b/apps/web/src/app/workspaces/components/capability-request/capability-request.component.ts index e97b11d27..daa5e1b72 100644 --- a/apps/web/src/app/workspaces/components/capability-request/capability-request.component.ts +++ b/apps/web/src/app/workspaces/components/capability-request/capability-request.component.ts @@ -85,8 +85,12 @@ export class CapabilityRequestComponent implements OnInit, OnDestroy { next: (capabilityVersion) => { if (capabilityVersion !== undefined) { this.latestVersion = capabilityVersion; - // Set selected version to be the request's current version if no version is selected - if (this.currentVersion === undefined) { + // Set selected version to be the request's latest version + // If no version is selected or if the selected version is the latest version + if ( + this.currentVersion === undefined || + this.currentVersion.version_number === this.latestVersion.version_number + ) { this.setVersion(this.latestVersion); } } else { -- GitLab