This commit is contained in:
Sofia Papacharalampous 2024-07-08 15:14:27 +03:00
parent 730863212a
commit 1eaa9c3156
1 changed files with 2 additions and 2 deletions

View File

@ -140,8 +140,8 @@ export class ReferenceService {
public getMultipleAutoCompleteSearchConfiguration(typeId: Guid, dependencyReferences: Reference[]): MultipleAutoCompleteConfiguration {
return {
initialItems: (excludedItems: any[], data?: any) => this.searchWithDefinition(this.buildAutocompleteSearchLookup(typeId, dependencyReferences, null)).pipe(map(x => x.filter(r => r.id))).pipe(map(x => x)),
filterFn: (searchQuery: string, excludedItems: any[]) => this.searchWithDefinition(this.buildAutocompleteSearchLookup(typeId, dependencyReferences, searchQuery)).pipe(map(x => x.filter(r => r.id))).pipe(map(x => x)),
initialItems: (excludedItems: any[], data?: any) => this.searchWithDefinition(this.buildAutocompleteSearchLookup(typeId, dependencyReferences, null)).pipe(map(x => x)),
filterFn: (searchQuery: string, excludedItems: any[]) => this.searchWithDefinition(this.buildAutocompleteSearchLookup(typeId, dependencyReferences, searchQuery)).pipe(map(x => x)),
displayFn: (item: Reference) => item.label,
titleFn: (item: Reference) => item.label,
subtitleFn: (item: Reference) => item?.sourceType === ReferenceSourceType.External ? this.language.instant('REFERENCE-FIELD-COMPONENT.EXTERNAL-SOURCE') + ': ' + item.source : this.language.instant('REFERENCE-FIELD-COMPONENT.INTERNAL-SOURCE'),