feat(assist): fixed double sort
This commit is contained in:
parent
6df525e258
commit
8d1e1795a7
1 changed files with 3 additions and 0 deletions
|
|
@ -162,6 +162,9 @@ const sortPaginate = function (list, filters) {
|
|||
const tB = getValue(b, "timestamp");
|
||||
return tA > tB ? 1 : tA < tB ? -1 : 0;
|
||||
});
|
||||
if (filters.sort.order) {
|
||||
list.reverse();
|
||||
}
|
||||
if ((filters.sort.key || "timestamp") !== "timestamp") {
|
||||
list.sort((a, b) => {
|
||||
const vA = getValue(a, filters.sort.key);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue