Skip to content

Commit

Permalink
fix: association fields cannot config in table (#2146)
Browse files Browse the repository at this point in the history
  • Loading branch information
katherinehhh committed Jun 28, 2023
1 parent 15f8243 commit ece7cb7
Showing 1 changed file with 4 additions and 4 deletions.
@@ -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) => {
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit ece7cb7

Please sign in to comment.