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