LP1908444 Support browse search record result sorting
authorBill Erickson <berickxx@gmail.com>
Wed, 16 Dec 2020 21:16:47 +0000 (13:16 -0800)
committerGalen Charlton <gmc@equinoxinitiative.org>
Wed, 10 Mar 2021 22:29:52 +0000 (17:29 -0500)
Allow users to sort the set of bib records which link to a browse
heading via the existing sort options.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/share/catalog/search-context.ts

index 908f203..4552d5e 100644 (file)
@@ -686,10 +686,17 @@ export class CatalogSearchContext {
                 this.browseSearch.reset();
                 this.identSearch.reset();
                 this.cnBrowseSearch.reset();
-                this.termSearch.hasBrowseEntry = '';
                 this.termSearch.browseEntry = null;
                 this.termSearch.fromMetarecord = null;
                 this.termSearch.facetFilters = [];
+
+                if (this.termSearch.query[0] !== '') {
+                    // If the user has entered a query, it takes precedence
+                    // over the source browse entry or source metarecord.
+                    this.termSearch.hasBrowseEntry = null;
+                    this.termSearch.fromMetarecord = null;
+                }
+
                 break;
 
             case 'ident':