mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-04 13:18:55 +08:00
fix: fix default value is not working in sutable (#3155)
This commit is contained in:
parent
a86a65cf2c
commit
1fddf0bcb5
@ -9,14 +9,13 @@ import { Button } from 'antd';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FormActiveFieldsProvider } from '../../../block-provider';
|
import { FormActiveFieldsProvider } from '../../../block-provider';
|
||||||
import { FlagProvider } from '../../../flag-provider';
|
import { FlagProvider } from '../../../flag-provider';
|
||||||
import { useSubTableSpecialCase } from '../form-item/hooks/useSpecialCase';
|
|
||||||
import { Table } from '../table-v2/Table';
|
import { Table } from '../table-v2/Table';
|
||||||
import { useAssociationFieldContext } from './hooks';
|
import { useAssociationFieldContext } from './hooks';
|
||||||
|
|
||||||
export const SubTable: any = observer(
|
export const SubTable: any = observer(
|
||||||
(props: any) => {
|
(props: any) => {
|
||||||
const { field } = useAssociationFieldContext<ArrayField>();
|
const { field } = useAssociationFieldContext<ArrayField>();
|
||||||
useSubTableSpecialCase({ field });
|
// useSubTableSpecialCase({ field });
|
||||||
const move = (fromIndex: number, toIndex: number) => {
|
const move = (fromIndex: number, toIndex: number) => {
|
||||||
if (toIndex === undefined) return;
|
if (toIndex === undefined) return;
|
||||||
if (!isArr(field.value)) return;
|
if (!isArr(field.value)) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user