80369: Add optional thumbnail followLink in SearchComponent

This commit is contained in:
Yura Bondarenko
2021-06-28 12:51:57 +02:00
parent c1b1cb2a27
commit eb0b3ae5f4

View File

@@ -130,8 +130,11 @@ export class SearchComponent implements OnInit {
this.searchLink = this.getSearchLink(); this.searchLink = this.getSearchLink();
this.searchOptions$ = this.getSearchOptions(); this.searchOptions$ = this.getSearchOptions();
this.sub = this.searchOptions$.pipe( this.sub = this.searchOptions$.pipe(
switchMap((options) => this.service.search(options).pipe(getFirstSucceededRemoteData(), startWith(undefined)))) switchMap((options) => this.service.search(
.subscribe((results) => { options, undefined, true, true, followLink<Item>('thumbnail', { isOptional: true })
).pipe(getFirstSucceededRemoteData(), startWith(undefined))
)
).subscribe((results) => {
this.resultsRD$.next(results); this.resultsRD$.next(results);
}); });
this.scopeListRD$ = this.searchConfigService.getCurrentScope('').pipe( this.scopeListRD$ = this.searchConfigService.getCurrentScope('').pipe(