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) {
|
searchFromAutocomplete(query: string) {
|
||||||
const autocompleteRequestItem: RequestItem<DatasetExternalAutocompleteCriteria> = new RequestItem();
|
const autocompleteRequestItem: RequestItem<DatasetExternalAutocompleteCriteria> = new RequestItem();
|
||||||
autocompleteRequestItem.criteria = new DatasetExternalAutocompleteCriteria();
|
autocompleteRequestItem.criteria = new DatasetExternalAutocompleteCriteria();
|
||||||
|
let parseIdArray: string[] = this.form.get('id').value.split('_');
|
||||||
autocompleteRequestItem.criteria.fieldID = this.form.get('id').value;
|
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') {
|
if (typeof this.datasetProfileId === 'string') {
|
||||||
autocompleteRequestItem.criteria.profileID = this.datasetProfileId;
|
autocompleteRequestItem.criteria.profileID = this.datasetProfileId;
|
||||||
} else if (this.datasetProfileId != null) {
|
} else if (this.datasetProfileId != null) {
|
||||||
|
|
Loading…
Reference in New Issue