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