Commits
Giuseppe Digilio authored 988747e392a
132 132 | * Set the selected external source. |
133 133 | */ |
134 134 | public makeSourceSelection(source): void { |
135 135 | this.selectedElement = source; |
136 136 | } |
137 137 | |
138 138 | /** |
139 139 | * Load the next pages of external sources. |
140 140 | */ |
141 141 | public onScroll(): void { |
142 - | if (!this.sourceListLoading && this.pageInfo.currentPage <= this.pageInfo.totalPages) { |
142 + | if (!this.sourceListLoading && ((this.pageInfo.currentPage + 1) <= this.pageInfo.totalPages)) { |
143 143 | this.sourceListLoading = true; |
144 144 | this.findListOptions = Object.assign({}, new FindListOptions(), { |
145 145 | elementsPerPage: 5, |
146 146 | currentPage: this.findListOptions.currentPage + 1, |
147 147 | }); |
148 148 | this.externalService.findAll(this.findListOptions).pipe( |
149 149 | catchError(() => { |
150 150 | const pageInfo = new PageInfo(); |
151 151 | const paginatedList = new PaginatedList(pageInfo, []); |
152 152 | const paginatedListRD = createSuccessfulRemoteDataObject(paginatedList); |