Fix bind value

This commit is contained in:
shamoon 2025-03-31 18:50:20 -07:00
parent cd954e38dd
commit 573b2f606a
No known key found for this signature in database
2 changed files with 5 additions and 2 deletions

View File

@ -30,14 +30,13 @@
[placeholder]="placeholder" [placeholder]="placeholder"
[notFoundText]="notFoundText" [notFoundText]="notFoundText"
[multiple]="true" [multiple]="true"
bindValue="id"
[compareWith]="compareDocuments" [compareWith]="compareDocuments"
[trackByFn]="trackByFn" [trackByFn]="trackByFn"
[minTermLength]="2" [minTermLength]="2"
[loading]="loading" [loading]="loading"
[typeahead]="documentsInput$" [typeahead]="documentsInput$"
(mousedown)="$event.stopImmediatePropagation()" (mousedown)="$event.stopImmediatePropagation()"
(change)="onChange(selectedDocuments)"> (change)="onChange(selectedDocumentIDs)">
<ng-template ng-label-tmp let-document="item"> <ng-template ng-label-tmp let-document="item">
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
@if (!disabled) { @if (!disabled) {

View File

@ -71,6 +71,10 @@ export class DocumentLinkComponent
@Input() @Input()
placeholder: string = $localize`Search for documents` placeholder: string = $localize`Search for documents`
get selectedDocumentIDs(): number[] {
return this.selectedDocuments.map((d) => d.id)
}
constructor(private documentsService: DocumentService) { constructor(private documentsService: DocumentService) {
super() super()
} }