From 8fbfd830c9b63f0dfc9503b3fee95291398075a0 Mon Sep 17 00:00:00 2001 From: Katherine Date: Tue, 21 May 2024 10:30:36 +0800 Subject: [PATCH] refactor: collection manager setting title field (#4419) --- .../Configuration/CollectionFields.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFields.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFields.tsx index c7035f686a..d45ccbc164 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFields.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFields.tsx @@ -137,11 +137,11 @@ const CurrentFields = (props) => { method: 'post', data: { titleField: checked ? record.name : 'id' }, }); - message.success(t('Saved successfully')); + ctx?.refresh?.(); await props.refreshAsync(); setLoadingRecord(null); refreshCM(); - ctx?.refresh?.(); + message.success(t('Saved successfully')); }; return isTitleField(record) ? ( @@ -255,11 +255,11 @@ const InheritFields = (props) => { method: 'post', data: { titleField: checked ? record.name : 'id' }, }); - message.success(t('Saved successfully')); + ctx?.refresh?.(); await props.refreshAsync(); setLoadingRecord(null); refreshCM(); - ctx?.refresh?.(); + message.success(t('Saved successfully')); }; return isTitleField(record) ? (