diff --git a/src-ui/src/app/components/common/input/document-link/document-link.component.html b/src-ui/src/app/components/common/input/document-link/document-link.component.html index 4a7e096d9..6eb380f10 100644 --- a/src-ui/src/app/components/common/input/document-link/document-link.component.html +++ b/src-ui/src/app/components/common/input/document-link/document-link.component.html @@ -30,14 +30,13 @@ [placeholder]="placeholder" [notFoundText]="notFoundText" [multiple]="true" - bindValue="id" [compareWith]="compareDocuments" [trackByFn]="trackByFn" [minTermLength]="2" [loading]="loading" [typeahead]="documentsInput$" (mousedown)="$event.stopImmediatePropagation()" - (change)="onChange(selectedDocuments)"> + (change)="onChange(selectedDocumentIDs)">
@if (!disabled) { diff --git a/src-ui/src/app/components/common/input/document-link/document-link.component.ts b/src-ui/src/app/components/common/input/document-link/document-link.component.ts index a9e6f115a..c5b613ba4 100644 --- a/src-ui/src/app/components/common/input/document-link/document-link.component.ts +++ b/src-ui/src/app/components/common/input/document-link/document-link.component.ts @@ -71,6 +71,10 @@ export class DocumentLinkComponent @Input() placeholder: string = $localize`Search for documents` + get selectedDocumentIDs(): number[] { + return this.selectedDocuments.map((d) => d.id) + } + constructor(private documentsService: DocumentService) { super() }