fix: linkagerule copy data mutual influence (#2333)
This commit is contained in:
parent
d6cc87d9a2
commit
5480167827
@ -5,7 +5,7 @@ import { ISchema, RecursionField, observer, useField, useFieldSchema } from '@fo
|
|||||||
import { toArr } from '@formily/shared';
|
import { toArr } from '@formily/shared';
|
||||||
import { Badge, Card, Collapse, CollapsePanelProps, CollapseProps, Empty, Input } from 'antd';
|
import { Badge, Card, Collapse, CollapsePanelProps, CollapseProps, Empty, Input } from 'antd';
|
||||||
import cls from 'classnames';
|
import cls from 'classnames';
|
||||||
import { clone } from 'lodash';
|
import { cloneDeep } from 'lodash';
|
||||||
import React, { Fragment, useEffect, useState } from 'react';
|
import React, { Fragment, useEffect, useState } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useToken } from '../../../style';
|
import { useToken } from '../../../style';
|
||||||
@ -257,7 +257,7 @@ ArrayCollapse.Copy = React.forwardRef((props: any, ref) => {
|
|||||||
if (self?.disabled) return;
|
if (self?.disabled) return;
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (array.props?.disabled) return;
|
if (array.props?.disabled) return;
|
||||||
const value = clone(array?.field?.value[index]);
|
const value = cloneDeep(array?.field?.value[index]);
|
||||||
array.field.push(value);
|
array.field.push(value);
|
||||||
if (props.onClick) {
|
if (props.onClick) {
|
||||||
props.onClick(e);
|
props.onClick(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user