68346: page-hover fix + pageSize reverted to 10

This commit is contained in:
Kristof De Langhe
2020-02-11 10:48:14 +01:00
parent 3dd433a5da
commit c38bf3fd0c

View File

@@ -52,7 +52,7 @@ export abstract class AbstractPaginatedDragAndDropListComponent<T extends DSpace
/** /**
* The amount of objects to display per page * The amount of objects to display per page
*/ */
pageSize = 2; pageSize = 10;
/** /**
* The page options to use for fetching the objects * The page options to use for fetching the objects
@@ -152,7 +152,7 @@ export abstract class AbstractPaginatedDragAndDropListComponent<T extends DSpace
drop(event: CdkDragDrop<any>) { drop(event: CdkDragDrop<any>) {
// Check if the user is hovering over any of the pagination's pages at the time of dropping the object // Check if the user is hovering over any of the pagination's pages at the time of dropping the object
const droppedOnElement = this.elRef.nativeElement.querySelector('.page-item:hover'); const droppedOnElement = this.elRef.nativeElement.querySelector('.page-item:hover');
if (isNotEmpty(droppedOnElement)) { if (hasValue(droppedOnElement) && hasValue(droppedOnElement.textContent)) {
// The user is hovering over a page, fetch the page's number from the element // The user is hovering over a page, fetch the page's number from the element
const page = Number(droppedOnElement.textContent); const page = Number(droppedOnElement.textContent);
if (hasValue(page) && !Number.isNaN(page)) { if (hasValue(page) && !Number.isNaN(page)) {