feat: workflow sort by name

This commit is contained in:
Yoan.liu
2026-08-05 22:06:42 +08:00
parent 72f7523902
commit e2a183e606
+3 -1
View File
@@ -52,6 +52,8 @@ const WorkflowList = () => {
{
key: "name",
title: t("workflow.props.name"),
sorter: true,
sortOrder: sorter.columnKey === "name" ? sorter.order : void 0,
render: (_, record) => (
<div className="flex max-w-full flex-col gap-1 truncate">
<Typography.Text ellipsis>{record.name || "\u00A0"}</Typography.Text>
@@ -242,7 +244,7 @@ const WorkflowList = () => {
() => {
const { columnKey: sorterKey, order: sorterOrder } = sorter;
let sort: string | undefined;
sort = sorterKey === "lastRun" ? "lastRunTime" : void 0;
sort = sorterKey === "name" ? "name" : sorterKey === "lastRun" ? "lastRunTime" : void 0;
sort = sort && (sorterOrder === "ascend" ? `${sort}` : sorterOrder === "descend" ? `-${sort}` : void 0);
return listWorkflows({