fix: 修复异常死循环问题 (#991)

Reviewed-on: daoyoucloud/tachybase#991
This commit is contained in:
sealday 2024-05-15 20:43:57 +08:00
parent d0bb8038ab
commit 3fbfa50566

View File

@ -1,5 +1,5 @@
import { LoadingOutlined, PlusOutlined } from '@ant-design/icons'; import { LoadingOutlined, PlusOutlined } from '@ant-design/icons';
import { onFieldChange } from '@tachybase/schema'; import { onFieldInputValueChange } from '@tachybase/schema';
import { RecursionField, connect, mapProps, observer, useField, useFieldSchema, useForm } from '@tachybase/schema'; import { RecursionField, connect, mapProps, observer, useField, useFieldSchema, useForm } from '@tachybase/schema';
import { uid } from '@tachybase/schema'; import { uid } from '@tachybase/schema';
import { Space, message } from 'antd'; import { Space, message } from 'antd';
@ -71,7 +71,7 @@ const InternalAssociationSelect = observer(
form.addEffects(id, () => { form.addEffects(id, () => {
if (linkageFields?.length > 0) { if (linkageFields?.length > 0) {
//支持深层次子表单 //支持深层次子表单
onFieldChange('*', (fieldPath: any) => { onFieldInputValueChange('*', (fieldPath: any) => {
if (linkageFields.includes(fieldPath.props.name) && field.value) { if (linkageFields.includes(fieldPath.props.name) && field.value) {
props.onChange(field.initialValue); props.onChange(field.initialValue);
setInnerValue(field.initialValue); setInnerValue(field.initialValue);