mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 06:53:03 +00:00
Add randomized sort again
This commit is contained in:
@@ -62,7 +62,11 @@ export class SearchService {
|
||||
elementsPerPage: returningPageInfo.elementsPerPage
|
||||
});
|
||||
const payload = itemsRD.payload.map((items: Item[]) => {
|
||||
return items.map((item: Item, index: number) => {
|
||||
return items.sort(()=>{
|
||||
const values = [-1, 0, 1];
|
||||
return values[Math.floor(Math.random() * values.length)];
|
||||
})
|
||||
.map((item: Item, index: number) => {
|
||||
const mockResult: SearchResult<DSpaceObject> = new SearchResult();
|
||||
mockResult.dspaceObject = item;
|
||||
const highlight = new Metadatum();
|
||||
|
Reference in New Issue
Block a user