From 863d000c379cc2db818306862f18100078317c5c Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Tue, 6 Feb 2024 11:19:49 +0800 Subject: [PATCH] refactor: useRefreshActionProps --- .../component/CollectionsManager/ConfigurationTable.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/ConfigurationTable.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/ConfigurationTable.tsx index 636d292d14..a1498ab085 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/ConfigurationTable.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/ConfigurationTable.tsx @@ -26,7 +26,6 @@ import { message } from 'antd'; import { getCollectionSchema } from './schema/collections'; import { CollectionFields } from './CollectionFields'; import { EditCollection } from './EditCollectionAction'; -import { DataSourceContext } from '../../DatabaseConnectionProvider'; /** * @param service @@ -134,8 +133,6 @@ export const ConfigurationTable = () => { const api = useAPIClient(); const field = useField(); field.data = field.data || {}; - const dm = useDataSourceManagerV2(); - const { setDataSource } = useContext(DataSourceContext); return { async onClick() { field.data.loading = true; @@ -147,8 +144,6 @@ export const ConfigurationTable = () => { field.data.loading = false; service?.refresh?.(); message.success(t('Data source synchronization in progress')); - dm.getDataSource(name).reload(); - setDataSource(dm.getDataSource(name)); } catch (error) { field.data.loading = false; }