fix: linkagerule copy data mutual influence (#2333)

This commit is contained in:
katherinehhh 2023-08-04 10:58:53 +08:00 committed by GitHub
parent d6cc87d9a2
commit 5480167827
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@ import { ISchema, RecursionField, observer, useField, useFieldSchema } from '@fo
import { toArr } from '@formily/shared';
import { Badge, Card, Collapse, CollapsePanelProps, CollapseProps, Empty, Input } from 'antd';
import cls from 'classnames';
import { clone } from 'lodash';
import { cloneDeep } from 'lodash';
import React, { Fragment, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useToken } from '../../../style';
@ -257,7 +257,7 @@ ArrayCollapse.Copy = React.forwardRef((props: any, ref) => {
if (self?.disabled) return;
e.stopPropagation();
if (array.props?.disabled) return;
const value = clone(array?.field?.value[index]);
const value = cloneDeep(array?.field?.value[index]);
array.field.push(value);
if (props.onClick) {
props.onClick(e);