mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-08 06:59:26 +08:00
Merge branch 'main' into next
This commit is contained in:
commit
643d23bbe0
@ -15,6 +15,7 @@ import { action } from '@formily/reactive';
|
|||||||
import { each } from '@formily/shared';
|
import { each } from '@formily/shared';
|
||||||
import { Button, Card, Divider, Tooltip } from 'antd';
|
import { Button, Card, Divider, Tooltip } from 'antd';
|
||||||
import React, { useCallback, useContext } from 'react';
|
import React, { useCallback, useContext } from 'react';
|
||||||
|
import { spliceArrayState } from '@formily/core/esm/shared/internals';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { FormActiveFieldsProvider } from '../../../block-provider/hooks/useFormActiveFields';
|
import { FormActiveFieldsProvider } from '../../../block-provider/hooks/useFormActiveFields';
|
||||||
import { useCollection } from '../../../data-source';
|
import { useCollection } from '../../../data-source';
|
||||||
@ -186,6 +187,10 @@ const ToManyNester = observer(
|
|||||||
style={{ zIndex: 1000, color: '#a8a3a3' }}
|
style={{ zIndex: 1000, color: '#a8a3a3' }}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
action(() => {
|
action(() => {
|
||||||
|
spliceArrayState(field as any, {
|
||||||
|
startIndex: index,
|
||||||
|
deleteCount: 1,
|
||||||
|
});
|
||||||
field.value.splice(index, 1);
|
field.value.splice(index, 1);
|
||||||
return field.onInput(field.value);
|
return field.onInput(field.value);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user