From 64446aa76868550cb48824f8a2672f9c9db6547f Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 22 Jun 2021 14:46:51 -0400 Subject: [PATCH] LP1929741 Combobox supports startsWith search (p2) Signed-off-by: Bill Erickson --- Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 1d4b089cee..77f435d4da 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 @@ -261,7 +261,11 @@ export class ComboboxComponent implements ControlValueAccessor, OnInit, AfterVie const field = this.idlField; const args = {}; 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); } -- 2.11.0