fix: remove default sorting status on UI

This commit is contained in:
jialin
2025-12-23 20:54:16 +08:00
parent 1b661bb8cd
commit fa0aeac10b
14 changed files with 8 additions and 34 deletions
+2 -6
View File
@@ -6,7 +6,6 @@ import SealTable from '@/components/seal-table';
import TableContext from '@/components/seal-table/table-context';
import { TableOrder } from '@/components/seal-table/types';
import { PageAction } from '@/config';
import { TABLE_SORT_DIRECTIONS } from '@/config/settings';
import type { PageActionType } from '@/config/types';
import useExpandedRowKeys from '@/hooks/use-expanded-row-keys';
import useTableFetch from '@/hooks/use-table-fetch';
@@ -70,10 +69,7 @@ const Clusters: React.FC = () => {
deleteAPI: deleteCluster,
watch: true,
API: CLUSTERS_API,
contentForDelete: 'menu.clusterManagement.clusters',
defaultQueryParams: {
sort_by: '-created_at'
}
contentForDelete: 'menu.clusterManagement.clusters'
});
const { watchDataList: allWorkerPoolList } = useWatchList(WORKER_POOLS_API);
const [expandAtom] = useAtom(expandKeysAtom);
@@ -330,7 +326,7 @@ const Clusters: React.FC = () => {
<SealTable
rowKey="id"
loadChildren={getWorkerPoolList}
sortDirections={TABLE_SORT_DIRECTIONS}
sortDirections={['descend', 'ascend']}
expandedRowKeys={expandedRowKeys}
onExpand={handleExpandChange}
onExpandAll={handleToggleExpandAll}