mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 05:53:03 +00:00
Merge branch 'master' into w2p-70237_entities-orgunit-submission-fix
This commit is contained in:
@@ -207,3 +207,13 @@ export const getFirstOccurrence = () =>
|
||||
source.pipe(
|
||||
map((rd) => Object.assign(rd, { payload: rd.payload.page.length > 0 ? rd.payload.page[0] : undefined }))
|
||||
);
|
||||
|
||||
/**
|
||||
* 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)))
|
||||
);
|
||||
|
Reference in New Issue
Block a user