fix(ui): incorrect default list sort

This commit is contained in:
Fu Diwei 2025-11-10 22:56:15 +08:00
parent 1f4b04a9b0
commit 65e0889af3
4 changed files with 4 additions and 4 deletions

View File

@ -238,7 +238,7 @@ const CertificateList = () => {
() => {
const { columnKey: sorterKey, order: sorterOrder } = sorter;
let sort: string | undefined;
sort = sorterKey === "validity" ? "validityNotAfter" : "";
sort = sorterKey === "validity" ? "validityNotAfter" : void 0;
sort = sort && (sorterOrder === "ascend" ? `${sort}` : sorterOrder === "descend" ? `-${sort}` : void 0);
return listCertificates({

View File

@ -235,7 +235,7 @@ const WorkflowList = () => {
() => {
const { columnKey: sorterKey, order: sorterOrder } = sorter;
let sort: string | undefined;
sort = sorterKey === "lastRun" ? "lastRunTime" : "";
sort = sorterKey === "lastRun" ? "lastRunTime" : void 0;
sort = sort && (sorterOrder === "ascend" ? `${sort}` : sorterOrder === "descend" ? `-${sort}` : void 0);
return listWorkflows({

View File

@ -55,7 +55,7 @@ export const list = async ({
expand: ["workflowRef"].join(","),
fields: [..._commonFields, ..._expandFields].join(","),
filter: filters.join(" && "),
sort: sort,
sort: sort || "-created",
requestKey: null,
});
};

View File

@ -57,7 +57,7 @@ export const list = async ({
expand: expand ? ["lastRunRef"].join(",") : void 0,
fields: [..._commonFields, ..._expandFields].join(","),
filter: filters.join(" && "),
sort: sort,
sort: sort || "-created",
requestKey: null,
});
};