diff --git a/src/hooks/use-table-fetch.ts b/src/hooks/use-table-fetch.ts index bd02131a..00dcc679 100644 --- a/src/hooks/use-table-fetch.ts +++ b/src/hooks/use-table-fetch.ts @@ -1,4 +1,4 @@ -import { TABLE_SORT_DIRECTIONS } from '@/config/settings'; +import { PaginationKey, TABLE_SORT_DIRECTIONS } from '@/config/settings'; import useSetChunkRequest, { createAxiosToken } from '@/hooks/use-chunk-request'; @@ -8,7 +8,6 @@ import { handleBatchRequest } from '@/utils'; import _ from 'lodash'; import qs from 'query-string'; import { useEffect, useRef, useState } from 'react'; -import { PaginationKey } from '../config/settings'; import { usePaginationStatus } from './use-pagination-status'; import { useTableMultiSort } from './use-table-sort'; @@ -265,6 +264,7 @@ export default function useTableFetch( url: `${API}?${qs.stringify(_.pickBy(query, (val: any) => !!val))}`, handler: updateHandler }); + // eslint-disable-next-line react-hooks/purity triggerAtRef.current = Date.now(); } catch (error) { // ignore @@ -361,6 +361,9 @@ export default function useTableFetch( ...modalRef.current?.configuration }); + // remove the deleted id from selected ids in row selection + rowSelection.removeSelectedKeys([row.id]); + // ======== to avoid fetch data twice, because of debounceFetchData has been run ======= if (!updateManually) { fetchData(); diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index 91ae51ff..b9772540 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -358,7 +358,7 @@ export default (props: any) => { config={{ apiBaseUrl: GPUSTACK_API_BASE_URL, theme: userSettings.theme, - iconUrl: '//at.alicdn.com/t/c/font_4613488_acsxe9xvhd.js', + iconUrl: '//at.alicdn.com/t/c/font_4613488_13sztx8tdru.js', isDarkTheme: userSettings.isDarkTheme, defaultColorPrimary: COLOR_PRIMARY }}