From ece7cb76c2ab67036116ac31e8ed074ff1cad1e2 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Wed, 28 Jun 2023 15:30:49 +0800 Subject: [PATCH] fix: association fields cannot config in table (#2146) --- .../buttons/TableColumnInitializers.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/client/src/schema-initializer/buttons/TableColumnInitializers.tsx b/packages/core/client/src/schema-initializer/buttons/TableColumnInitializers.tsx index 06d96d0f8..69d6abd8a 100644 --- a/packages/core/client/src/schema-initializer/buttons/TableColumnInitializers.tsx +++ b/packages/core/client/src/schema-initializer/buttons/TableColumnInitializers.tsx @@ -1,14 +1,14 @@ +import { useField, useFieldSchema } from '@formily/react'; import React from 'react'; import { useTranslation } from 'react-i18next'; +import { useCompile } from '../../schema-component'; import { SchemaInitializer } from '../SchemaInitializer'; import { itemsMerge, useAssociatedTableColumnInitializerFields, - useTableColumnInitializerFields, useInheritsTableColumnInitializerFields, + useTableColumnInitializerFields, } from '../utils'; -import { useCompile } from '../../schema-component'; -import { useField, useFieldSchema } from '@formily/react'; // 表格列配置 export const TableColumnInitializers = (props: any) => { @@ -42,7 +42,7 @@ export const TableColumnInitializers = (props: any) => { ); }); } - if (associatedFields?.length > 0 && field.readPretty) { + if (associatedFields?.length > 0 && (!isSubTable || field.readPretty)) { fieldItems.push( { type: 'divider',