From 78b2b3298ecb909d2944c5a11a5599b10e2d150e 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 Signed-off-by: Galen Charlton Signed-off-by: Jane Sandberg --- 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 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); } -- 2.11.0