fix: pagination cache for table list

This commit is contained in:
jialin
2026-03-17 16:35:55 +08:00
committed by jialin
parent e72cacc4b2
commit 68519223fa
10 changed files with 28 additions and 9 deletions
+2 -1
View File
@@ -6,7 +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 { PaginationKey, 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';
@@ -66,6 +66,7 @@ const Clusters: React.FC = () => {
handleSearch,
handleNameChange
} = useTableFetch<ListItem>({
key: PaginationKey.Clusters,
fetchAPI: queryClusterList,
deleteAPI: deleteCluster,
watch: true,
+2 -1
View File
@@ -3,7 +3,7 @@ import DeleteModal from '@/components/delete-modal';
import IconFont from '@/components/icon-font';
import { FilterBar } from '@/components/page-tools';
import { PageAction } from '@/config';
import { TABLE_SORT_DIRECTIONS } from '@/config/settings';
import { PaginationKey, TABLE_SORT_DIRECTIONS } from '@/config/settings';
import type { PageActionType } from '@/config/types';
import useTableFetch from '@/hooks/use-table-fetch';
import { useIntl, useNavigate } from '@umijs/max';
@@ -58,6 +58,7 @@ const Credentials: React.FC = () => {
handleSearch,
handleNameChange
} = useTableFetch<ListItem>({
key: PaginationKey.Credentials,
fetchAPI: queryCredentialList,
deleteAPI: deleteCredential,
contentForDelete: 'menu.clusterManagement.credentials'