fix: data source add field refresh(T-3253) (#3645)

This commit is contained in:
jack zhang 2024-03-12 15:13:56 +08:00 committed by GitHub
parent 37b97c6e52
commit de6e8469d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,6 +22,7 @@ import {
useCurrentAppInfo,
useAPIClient,
useFieldInterfaceOptions,
useDataSourceManager,
} from '@nocobase/client';
import { ForeignKey } from './components';
@ -157,6 +158,7 @@ const useCreateCollectionField = () => {
const api = useAPIClient();
const record = useRecord();
const { name: dataSourceKey } = useParams();
const dm = useDataSourceManager();
return {
async run() {
await form.submit();
@ -176,6 +178,7 @@ const useCreateCollectionField = () => {
data: values,
});
ctx.setVisible(false);
dm.getDataSource(dataSourceKey).reload();
await form.reset();
field.data.loading = false;
refresh();