mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
#895 fix colums sorting
This commit is contained in:
@@ -172,13 +172,18 @@ export class ObjectGridComponent implements OnInit {
|
||||
|
||||
const result = [];
|
||||
|
||||
let index = 0;
|
||||
page.forEach((obj: ListableObject, i: number) => {
|
||||
const colNb = i % nbColumns;
|
||||
let col = result[colNb];
|
||||
|
||||
if (i % nbColumns === 0 && i > 0) {
|
||||
index++;
|
||||
}
|
||||
|
||||
let col = result[index];
|
||||
if (hasNoValue(col)) {
|
||||
col = [];
|
||||
}
|
||||
result[colNb] = [...col, obj];
|
||||
result[index] = [...col, obj];
|
||||
});
|
||||
return result;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user