From: Bill Erickson Date: Fri, 4 Dec 2020 20:39:33 +0000 (-0500) Subject: LP1929741 Combobox idl auto query filter addition X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=def86272dc828fe449475d2c149cd69405c06224;p=evergreen%2Fpines.git LP1929741 Combobox idl auto query filter addition Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton Signed-off-by: Jane Sandberg --- 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 a365c7eb72..dd4639556a 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 @@ -107,6 +107,10 @@ export class ComboboxComponent implements ControlValueAccessor, OnInit, AfterVie @Input() idlBaseQuery: any = null; @Input() startIdFiresOnChange: boolean; + // This will be appended to the async data retrieval query + // when fetching objects by idlClass. + @Input() idlQueryAnd: {[field: string]: any}; + // Allow the selected entry ID to be passed via the template // This does NOT not emit onChange events. @Input() set selectedId(id: any) { @@ -263,6 +267,9 @@ export class ComboboxComponent implements ControlValueAccessor, OnInit, AfterVie } const extra_args = { order_by : {} }; args[field] = {'ilike': `%${term}%`}; // could -or search on label + if (this.idlQueryAnd) { + Object.assign(args, this.idlQueryAnd); + } extra_args['order_by'][this.idlClass] = field; extra_args['limit'] = 100; if (this.idlIncludeLibraryInLabel) {