fix: cancel sorting

This commit is contained in:
jialin
2025-12-24 15:40:19 +08:00
parent a9b58a5564
commit b25189feea
16 changed files with 51 additions and 12 deletions
+3 -1
View File
@@ -6,6 +6,7 @@ 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';
@@ -326,12 +327,13 @@ const Clusters: React.FC = () => {
<SealTable
rowKey="id"
loadChildren={getWorkerPoolList}
sortDirections={['descend', 'ascend']}
sortDirections={TABLE_SORT_DIRECTIONS}
expandedRowKeys={expandedRowKeys}
onExpand={handleExpandChange}
onExpandAll={handleToggleExpandAll}
renderChildren={renderChildren}
onTableSort={handleOnSortChange}
showSorterTooltip={false}
dataSource={dataSource.dataList}
loading={dataSource.loading}
loadend={dataSource.loadend}
@@ -36,7 +36,6 @@ const useCredentialColumns = (
{
title: intl.formatMessage({ id: 'common.table.createTime' }),
dataIndex: 'created_at',
showSorterTooltip: false,
sorter: tableSorter(3),
ellipsis: {
showTitle: false
@@ -727,6 +727,7 @@ const Models: React.FC<ModelsProps> = ({
dataSource={dataSource}
rowSelection={rowSelection}
expandedRowKeys={expandedRowKeys}
showSorterTooltip={false}
onExpand={handleExpandChange}
onExpandAll={handleToggleExpandAll}
loading={loading}
+1
View File
@@ -327,6 +327,7 @@ const Models: React.FC = () => {
setQueryParams((pre: any) => {
return {
...pre,
page: 1,
sort_by: sortKeys.join(',')
};
});
@@ -179,7 +179,6 @@ const useUsersColumns = ({
title: intl.formatMessage({ id: 'common.table.createTime' }),
dataIndex: 'created_at',
key: 'created_at',
showSorterTooltip: false,
sorter: tableSorter(5),
ellipsis: {
showTitle: false