68346: PaginatedDragAndDropBitstreamList component and refactoring item-edit-bitstream-bundle using this new component ; removed pagination-drag-and-drop

This commit is contained in:
Kristof De Langhe
2020-02-06 16:57:17 +01:00
parent 90f8bf42a1
commit 5e93a89678
10 changed files with 207 additions and 170 deletions

View File

@@ -137,3 +137,13 @@ export const getFirstSucceededRemoteDataPayload = () =>
hasValueOperator(),
take(1)
);
/**
* Operator for turning the current page of bitstreams into an array
*/
export const paginatedListToArray = () =>
<T extends DSpaceObject>(source: Observable<RemoteData<PaginatedList<T>>>): Observable<T[]> =>
source.pipe(
hasValueOperator(),
map((objectRD: RemoteData<PaginatedList<T>>) => objectRD.payload.page.filter((object: T) => hasValue(object)))
);