From 4240b8aa9f686097d7fe48bc8397d9243ff222bb Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 30 Jul 2020 15:29:08 -0400 Subject: [PATCH] LP1889685 Staff catalog record CN browse retains search Using the Shelf Browse tab on the record detail page in the Angular staff catalog no longer clobbers the active search, allowing the search navigation buttons (Next, Previous, etc.) to continue working. Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- .../src/eg2/src/app/staff/catalog/cnbrowse/results.component.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/cnbrowse/results.component.ts b/Open-ILS/src/eg2/src/app/staff/catalog/cnbrowse/results.component.ts index 9c0dab3dcf..b9e2076083 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/cnbrowse/results.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/catalog/cnbrowse/results.component.ts @@ -48,6 +48,13 @@ export class CnBrowseResultsComponent implements OnInit, OnDestroy { ngOnInit() { this.searchContext = this.staffCat.searchContext; + if (this.bibSummary) { + // Avoid clobbering the active search when browsing in + // the context of a specific record. + this.searchContext = + this.staffCat.cloneContext(this.searchContext); + } + for (let idx = 0; idx < this.rowCount; idx++) { this.rowIndexList.push(idx); } -- 2.11.0