|
|
|
@@ -19,6 +19,8 @@ export class SearchSelectComponent implements OnInit, AfterViewInit { |
|
|
|
@Input() public getDataFunction!: Function; |
|
|
|
@Input() public dataSource: any; |
|
|
|
@Input() public searchSelectColDefs!: SearchInputColDef[]; |
|
|
|
@Input() public displayedDataField!: string; |
|
|
|
@Input() public displayedDataSubResource!: string; |
|
|
|
|
|
|
|
@Output() rowSelected = new EventEmitter<any>(); |
|
|
|
|
|
|
|
@@ -90,7 +92,11 @@ export class SearchSelectComponent implements OnInit, AfterViewInit { |
|
|
|
console.log(row, index); |
|
|
|
this.selectedRowIndex = index; |
|
|
|
this.documentForm.get(this.formId)?.setValue(row.id); |
|
|
|
this.paragraphRef.nativeElement.textContent = row.fullName; |
|
|
|
if (this.displayedDataSubResource !== undefined) { |
|
|
|
this.paragraphRef.nativeElement.textContent = row[this.displayedDataSubResource][this.displayedDataField]; |
|
|
|
} else { |
|
|
|
this.paragraphRef.nativeElement.textContent = row[this.displayedDataField]; |
|
|
|
} |
|
|
|
this.searchBoxFilled = true; |
|
|
|
this.searchBoxOpen = false; |
|
|
|
} |
|
|
|
|