combobox: ensure that values are return on click
authorGalen Charlton <gmc@equinoxOLI.org>
Fri, 4 Jun 2021 15:00:05 +0000 (11:00 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 4 Jun 2021 15:00:33 +0000 (11:00 -0400)
... for both async and static data sources

LH#54

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts

index ba3cc95..3d39398 100644 (file)
@@ -497,7 +497,13 @@ export class ComboboxComponent implements ControlValueAccessor, OnInit, AfterVie
                 if (term === '') { return []; }
 
                 // Clicking always displays the full list.
-                if (term === '_CLICK_') { term = ''; }
+                if (term === '_CLICK_') {
+                    if (this.asyncDataSource) {
+                        term = '';
+                    } else {
+                        return this.entrylist;
+                    }
+                }
 
                 // Filter entrylist whose labels substring-match the
                 // text entered.