fix: association fields cannot config in table (#2146)

This commit is contained in:
katherinehhh 2023-06-28 15:30:49 +08:00 committed by GitHub
parent 15f824387e
commit ece7cb76c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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',