From: Bill Erickson Date: Tue, 22 Jun 2021 18:46:51 +0000 (-0400) Subject: LP1929741 Combobox supports startsWith search (p2) X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8a1cea70d8b366d82a3433bc186b8bc092389d70;p=working%2FEvergreen.git LP1929741 Combobox supports startsWith search (p2) Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts b/Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts index b34cf1b3fe..50cc70f10f 100644 --- a/Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts +++ b/Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts @@ -279,7 +279,11 @@ export class ComboboxComponent implements ControlValueAccessor, OnInit, AfterVie args = this.idlBaseQuery; } const extra_args = { order_by : {} }; - args[field] = {'ilike': `%${term}%`}; // could -or search on label + if (this.startsWith) { + args[field] = {'ilike': `${term}%`}; + } else { + args[field] = {'ilike': `%${term}%`}; // could -or search on label + } if (this.idlQueryAnd) { Object.assign(args, this.idlQueryAnd); }