From 60e26e8e0f02ae963c21a318959e6c5a93f4c529 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 15 Jul 2022 22:16:23 +0000 Subject: [PATCH] LP1929749: (follow-up) reload the upload form if we navigate to it from itself Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.component.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.component.ts index ef12730b17..39300fb692 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.component.ts @@ -1,5 +1,6 @@ import {Component, OnInit, AfterViewInit, Input, ViewChild, OnDestroy} from '@angular/core'; +import {Router} from '@angular/router'; import {Subject} from 'rxjs'; import {tap} from 'rxjs/operators'; import {IdlObject} from '@eg/core/idl.service'; @@ -151,6 +152,7 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { constructor( private http: HttpClient, + private router: Router, private toast: ToastService, private evt: EventService, private net: NetService, @@ -159,6 +161,11 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { private store: ServerStoreService, private vlagent: PicklistUploadService ) { + // force a reload of the component if we navigate to it + // from itself + this.router.routeReuseStrategy.shouldReuseRoute = () => { + return false; + }; this.applyDefaults(); this.applySettings(); } -- 2.11.0