LP1889685 Staff catalog record CN browse retains search user/berick/lp1869898-ang-staff-cat-default-5-1889694-1889685
authorBill Erickson <berickxx@gmail.com>
Thu, 30 Jul 2020 19:29:08 +0000 (15:29 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 6 Aug 2020 18:13:43 +0000 (14:13 -0400)
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 <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/staff/catalog/cnbrowse/results.component.ts

index 9c0dab3..b9e2076 100644 (file)
@@ -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);
         }