fix: colorPrimary cache cleared
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { TABLE_SORT_DIRECTIONS } from '@/config/settings';
|
import { PaginationKey, TABLE_SORT_DIRECTIONS } from '@/config/settings';
|
||||||
import useSetChunkRequest, {
|
import useSetChunkRequest, {
|
||||||
createAxiosToken
|
createAxiosToken
|
||||||
} from '@/hooks/use-chunk-request';
|
} from '@/hooks/use-chunk-request';
|
||||||
@@ -8,7 +8,6 @@ import { handleBatchRequest } from '@/utils';
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import qs from 'query-string';
|
import qs from 'query-string';
|
||||||
import { useEffect, useRef, useState } from 'react';
|
import { useEffect, useRef, useState } from 'react';
|
||||||
import { PaginationKey } from '../config/settings';
|
|
||||||
import { usePaginationStatus } from './use-pagination-status';
|
import { usePaginationStatus } from './use-pagination-status';
|
||||||
import { useTableMultiSort } from './use-table-sort';
|
import { useTableMultiSort } from './use-table-sort';
|
||||||
|
|
||||||
@@ -265,6 +264,7 @@ export default function useTableFetch<T>(
|
|||||||
url: `${API}?${qs.stringify(_.pickBy(query, (val: any) => !!val))}`,
|
url: `${API}?${qs.stringify(_.pickBy(query, (val: any) => !!val))}`,
|
||||||
handler: updateHandler
|
handler: updateHandler
|
||||||
});
|
});
|
||||||
|
// eslint-disable-next-line react-hooks/purity
|
||||||
triggerAtRef.current = Date.now();
|
triggerAtRef.current = Date.now();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// ignore
|
// ignore
|
||||||
@@ -361,6 +361,9 @@ export default function useTableFetch<T>(
|
|||||||
...modalRef.current?.configuration
|
...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 =======
|
// ======== to avoid fetch data twice, because of debounceFetchData has been run =======
|
||||||
if (!updateManually) {
|
if (!updateManually) {
|
||||||
fetchData();
|
fetchData();
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ export default (props: any) => {
|
|||||||
config={{
|
config={{
|
||||||
apiBaseUrl: GPUSTACK_API_BASE_URL,
|
apiBaseUrl: GPUSTACK_API_BASE_URL,
|
||||||
theme: userSettings.theme,
|
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,
|
isDarkTheme: userSettings.isDarkTheme,
|
||||||
defaultColorPrimary: COLOR_PRIMARY
|
defaultColorPrimary: COLOR_PRIMARY
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user