fix(sub-table): allows configuration of "Display association fields" (#2073)
This commit is contained in:
parent
ccfc9b8625
commit
87e37757b3
@ -8,12 +8,13 @@ import {
|
||||
useInheritsTableColumnInitializerFields,
|
||||
} from '../utils';
|
||||
import { useCompile } from '../../schema-component';
|
||||
import { useFieldSchema } from '@formily/react';
|
||||
import { useField, useFieldSchema } from '@formily/react';
|
||||
|
||||
// 表格列配置
|
||||
export const TableColumnInitializers = (props: any) => {
|
||||
const { items = [], action = true } = props;
|
||||
const { t } = useTranslation();
|
||||
const field = useField();
|
||||
const fieldSchema = useFieldSchema();
|
||||
const associatedFields = useAssociatedTableColumnInitializerFields();
|
||||
const inheritFields = useInheritsTableColumnInitializerFields();
|
||||
@ -41,7 +42,7 @@ export const TableColumnInitializers = (props: any) => {
|
||||
);
|
||||
});
|
||||
}
|
||||
if (associatedFields?.length > 0 && !isSubTable) {
|
||||
if (associatedFields?.length > 0 && field.readPretty) {
|
||||
fieldItems.push(
|
||||
{
|
||||
type: 'divider',
|
||||
|
Loading…
Reference in New Issue
Block a user