This option allows to caller to tack on additional conditions to the
auto-generated data source, e.g., to restrict a selector to only
"active" values.
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Ruth Frasur <rfrasur@library.in.gov>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
// unless startIdFiresOnChange is set to true.
@Input() startId: any = null;
@Input() idlClass: string;
+ @Input() idlBaseQuery: any = null;
@Input() startIdFiresOnChange: boolean;
// Allow the selected entry ID to be passed via the template
this.asyncDataSource = term => {
const field = this.idlField;
- const args = {};
+ let args = {};
+ if (this.idlBaseQuery) {
+ args = this.idlBaseQuery;
+ }
const extra_args = { order_by : {} };
args[field] = {'ilike': `%${term}%`}; // could -or search on label
extra_args['order_by'][this.idlClass] = field;