mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 05:25:52 +00:00
Merge branch 'main' into next
This commit is contained in:
commit
09e3cb4996
@ -10,8 +10,8 @@
|
||||
import { merge } from '@formily/shared';
|
||||
import React from 'react';
|
||||
|
||||
import { useCurrentSchema } from '../utils';
|
||||
import { SchemaInitializerSwitch, useSchemaInitializer } from '../../application';
|
||||
import { useCurrentSchema } from '../utils';
|
||||
|
||||
export const InitializerWithSwitch = (props) => {
|
||||
const { type, schema, item, remove: passInRemove, disabled } = props;
|
||||
|
@ -763,6 +763,7 @@ export const useCurrentSchema = (action: string, key: string, find = findSchema,
|
||||
form?.query(new RegExp(`${schema.parent.name}.${schema.name}$`)).forEach((field: Field) => {
|
||||
// 如果字段被删掉,那么在提交的时候不应该提交这个字段
|
||||
field.setValue?.(undefined);
|
||||
field.setInitialValue?.(undefined);
|
||||
});
|
||||
schema && rm(schema, remove);
|
||||
},
|
||||
|
@ -495,6 +495,7 @@ export const SchemaSettingsRemove: FC<SchemaSettingsRemoveProps> = (props) => {
|
||||
form?.query(new RegExp(`${fieldSchema.parent.name}.${fieldSchema.name}$`)).forEach((field: Field) => {
|
||||
// 如果字段被删掉,那么在提交的时候不应该提交这个字段
|
||||
field.setValue?.(undefined);
|
||||
field.setInitialValue?.(undefined);
|
||||
});
|
||||
removeDataBlock(fieldSchema['x-uid']);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user