mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
104312: DsDynamicLookupRelationExternalSourceTabComponent should have the form value already filled in the search input
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
[collection]="collection"
|
||||
[relationship]="relationshipOptions"
|
||||
[context]="context"
|
||||
[query]="query"
|
||||
[externalSource]="source"
|
||||
(importedObject)="imported($event)"
|
||||
class="d-block pt-3">
|
||||
|
@@ -74,6 +74,12 @@ export class DsDynamicLookupRelationExternalSourceTabComponent implements OnInit
|
||||
* The context to displaying lists for
|
||||
*/
|
||||
@Input() context: Context;
|
||||
|
||||
/**
|
||||
* The search query
|
||||
*/
|
||||
@Input() query: string;
|
||||
|
||||
@Input() repeatable: boolean;
|
||||
/**
|
||||
* Emit an event when an object has been imported (or selected from similar local entries)
|
||||
@@ -147,8 +153,12 @@ export class DsDynamicLookupRelationExternalSourceTabComponent implements OnInit
|
||||
|
||||
this.resetRoute();
|
||||
this.entriesRD$ = this.searchConfigService.paginatedSearchOptions.pipe(
|
||||
switchMap((searchOptions: PaginatedSearchOptions) =>
|
||||
this.externalSourceService.getExternalSourceEntries(this.externalSource.id, searchOptions).pipe(startWith(undefined)))
|
||||
switchMap((searchOptions: PaginatedSearchOptions) => {
|
||||
if (searchOptions.query === '') {
|
||||
searchOptions.query = this.query;
|
||||
}
|
||||
return this.externalSourceService.getExternalSourceEntries(this.externalSource.id, searchOptions).pipe(startWith(undefined));
|
||||
})
|
||||
);
|
||||
this.currentPagination$ = this.paginationService.getCurrentPagination(this.searchConfigService.paginationID, this.initialPagination);
|
||||
this.importConfig = {
|
||||
|
Reference in New Issue
Block a user