Fix autocomplete in multiplicity items by using parent field id.
This commit is contained in:
parent
e329ef763a
commit
989f07787c
|
@ -379,8 +379,12 @@ export class FormFieldComponent extends BaseComponent implements OnInit {
|
|||
searchFromAutocomplete(query: string) {
|
||||
const autocompleteRequestItem: RequestItem<DatasetExternalAutocompleteCriteria> = new RequestItem();
|
||||
autocompleteRequestItem.criteria = new DatasetExternalAutocompleteCriteria();
|
||||
|
||||
autocompleteRequestItem.criteria.fieldID = this.form.get('id').value;
|
||||
let parseIdArray: string[] = this.form.get('id').value.split('_');
|
||||
if(parseIdArray.length > 1) {
|
||||
autocompleteRequestItem.criteria.fieldID = parseIdArray[parseIdArray.length - 1];
|
||||
} else {
|
||||
autocompleteRequestItem.criteria.fieldID = this.form.get('id').value;
|
||||
}
|
||||
if (typeof this.datasetProfileId === 'string') {
|
||||
autocompleteRequestItem.criteria.profileID = this.datasetProfileId;
|
||||
} else if (this.datasetProfileId != null) {
|
||||
|
|
Loading…
Reference in New Issue