Fix issue with autocomplete field
This commit is contained in:
parent
fed426e64b
commit
040ffdc57e
|
@ -44,7 +44,7 @@ export class FormFieldComponent extends BaseComponent implements OnInit {
|
||||||
|
|
||||||
// @Input() field: Field;
|
// @Input() field: Field;
|
||||||
@Input() form: FormGroup;
|
@Input() form: FormGroup;
|
||||||
@Input() datasetProfileId: String;
|
@Input() datasetProfileId: any;
|
||||||
@Input() isChild: Boolean = false;
|
@Input() isChild: Boolean = false;
|
||||||
|
|
||||||
// change: Subscription;
|
// change: Subscription;
|
||||||
|
@ -265,7 +265,11 @@ export class FormFieldComponent extends BaseComponent implements OnInit {
|
||||||
autocompleteRequestItem.criteria = new DatasetExternalAutocompleteCriteria();
|
autocompleteRequestItem.criteria = new DatasetExternalAutocompleteCriteria();
|
||||||
|
|
||||||
autocompleteRequestItem.criteria.fieldID = this.form.get('id').value;
|
autocompleteRequestItem.criteria.fieldID = this.form.get('id').value;
|
||||||
autocompleteRequestItem.criteria.profileID = this.datasetProfileId;
|
if (typeof this.datasetProfileId === 'string') {
|
||||||
|
autocompleteRequestItem.criteria.profileID = this.datasetProfileId;
|
||||||
|
} else {
|
||||||
|
autocompleteRequestItem.criteria.profileID = this.datasetProfileId.id;
|
||||||
|
}
|
||||||
autocompleteRequestItem.criteria.like = query;
|
autocompleteRequestItem.criteria.like = query;
|
||||||
return this.datasetExternalAutocompleteService.queryAutocomplete(autocompleteRequestItem);
|
return this.datasetExternalAutocompleteService.queryAutocomplete(autocompleteRequestItem);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue