Skip to content

Commit 1d8119f

Browse files
alisaismailatiFrancescoMolinaro
authored andcommitted
Merged in task/dspace-cris-2023_02_x/DSC-1710 (pull request DSpace#1722)
Merged in task/sangallen/CST-14956 (pull request DSpace#1715) Approved-by: Francesco Molinaro
2 parents 1d6edf2 + c51ad5a commit 1d8119f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export class DsDynamicScrollableDropdownComponent extends DsDynamicVocabularyCom
157157
this.pageInfo.totalElements,
158158
this.pageInfo.totalPages
159159
);
160-
this.retrieveEntries(this.searchText, false, true);
160+
this.retrieveEntries(this.searchText, false, true, true);
161161
}
162162
}
163163

@@ -203,13 +203,13 @@ export class DsDynamicScrollableDropdownComponent extends DsDynamicVocabularyCom
203203
* @param concatResults If true concat results to the current list
204204
* @private
205205
*/
206-
private retrieveEntries(searchText = null, initModel = false, concatResults = false) {
206+
private retrieveEntries(searchText = null, initModel = false, concatResults = false, isScrolling = false) {
207207
this.searchText = searchText;
208208
let search$: Observable<RemoteData<PaginatedList<VocabularyEntry>>>;
209209
if (searchText) {
210210
const searchPageInfo = Object.assign(new PageInfo(), {
211211
elementsPerPage: this.pageInfo.elementsPerPage,
212-
currentPage: 1,
212+
currentPage: isScrolling ? this.pageInfo.currentPage : 1,
213213
totalElements: this.pageInfo.totalElements,
214214
totalPages: this.pageInfo.totalPages });
215215
search$ = this.vocabularyService.getVocabularyEntriesByValue(this.searchText, false, this.model.vocabularyOptions,

0 commit comments

Comments
 (0)