Skip to content

Commit 8d3e122

Browse files
authored
Merge pull request DSpace#5670 from DSpace/backport-5622-to-dspace-8_x
[Port dspace-8_x] fix DSpace#5544: enlarge dropdown for external source import
2 parents 09778e8 + 9cc0b96 commit 8d3e122

3 files changed

Lines changed: 14 additions & 5 deletions

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313

1414
.scrollable-menu {
1515
height: auto;
16-
max-height: calc(var(--ds-dropdown-menu-max-height) / 2);
16+
max-height: calc(var(--ds-dropdown-menu-max-height) * 2);
1717
overflow-x: hidden;
18+
overflow-y: auto;
1819
}
1920

2021
.scrollable-dropdown-loading {

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,25 @@ describe('SubmissionImportExternalSearchbarComponent test suite', () => {
140140
expect(comp.selectedElement).toEqual(selectedElement);
141141
});
142142

143+
it('Should use elementsPerPage of 20 on init', () => {
144+
comp.initExternalSourceData = { entity: 'Publication', sourceId: '', query: '' };
145+
scheduler.schedule(() => fixture.detectChanges());
146+
scheduler.flush();
147+
148+
expect(compAsAny.findListOptions.elementsPerPage).toEqual(20);
149+
});
150+
143151
it('Should load additional external sources', () => {
144152
comp.initExternalSourceData = { entity: 'Publication', query: 'dummy', sourceId: 'ciencia' };
145153
comp.sourceListLoading = false;
146154
compAsAny.pageInfo = new PageInfo({
147-
elementsPerPage: 3,
155+
elementsPerPage: 20,
148156
totalElements: 6,
149157
totalPages: 2,
150158
currentPage: 0,
151159
});
152160
compAsAny.findListOptions = Object.assign({}, new FindListOptions(), {
153-
elementsPerPage: 3,
161+
elementsPerPage: 20,
154162
currentPage: 0,
155163
searchParams: [
156164
new RequestParam('entityType', 'Publication'),

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export class SubmissionImportExternalSearchbarComponent implements OnInit, OnDes
143143
this.searchString = '';
144144
this.sourceList = [];
145145
this.findListOptions = Object.assign({}, new FindListOptions(), {
146-
elementsPerPage: 5,
146+
elementsPerPage: 20,
147147
currentPage: 1,
148148
searchParams: [
149149
new RequestParam('entityType', this.initExternalSourceData.entity),
@@ -188,7 +188,7 @@ export class SubmissionImportExternalSearchbarComponent implements OnInit, OnDes
188188
if (!this.sourceListLoading && ((this.pageInfo.currentPage + 1) <= this.pageInfo.totalPages)) {
189189
this.sourceListLoading = true;
190190
this.findListOptions = Object.assign({}, new FindListOptions(), {
191-
elementsPerPage: 5,
191+
elementsPerPage: 20,
192192
currentPage: this.findListOptions.currentPage + 1,
193193
searchParams: [
194194
new RequestParam('entityType', this.initExternalSourceData.entity),

0 commit comments

Comments
 (0)