Commits

Giuseppe Digilio authored f1256b37952
[CSTPER-138] Fixed issue with request pagination while retrieving external source providers
No tags

src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.ts

Modified
94 94 */
95 95 ngOnInit() {
96 96 this.selectedElement = {
97 97 id: '',
98 98 name: 'loading'
99 99 };
100 100 this.searchString = '';
101 101 this.sourceList = [];
102 102 this.findListOptions = Object.assign({}, new FindListOptions(), {
103 103 elementsPerPage: 5,
104 - currentPage: 0,
104 + currentPage: 1,
105 105 });
106 106 this.externalService.findAll(this.findListOptions).pipe(
107 107 catchError(() => {
108 108 const pageInfo = new PageInfo();
109 109 const paginatedList = new PaginatedList(pageInfo, []);
110 110 const paginatedListRD = createSuccessfulRemoteDataObject(paginatedList);
111 111 return observableOf(paginatedListRD);
112 112 }),
113 113 getFirstSucceededRemoteDataPayload()
114 114 ).subscribe((externalSource: PaginatedList<ExternalSource>) => {

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut