fix: sub-table should not support action column (#3497)

* fix: sub-table should not support action column

* fix: sub-table should not support action column
This commit is contained in:
katherinehhh 2024-02-07 15:43:07 +08:00 committed by GitHub
parent 626823b4b5
commit ea35d103ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -87,12 +87,20 @@ export const tableColumnInitializers = new SchemaInitializer({
{ {
name: 'divider', name: 'divider',
type: 'divider', type: 'divider',
useVisible() {
const fieldSchema = useFieldSchema();
return fieldSchema['x-component'] !== 'AssociationField.SubTable';
},
}, },
{ {
type: 'item', type: 'item',
name: 'add', name: 'add',
title: '{{t("Action column")}}', title: '{{t("Action column")}}',
Component: 'TableActionColumnInitializer', Component: 'TableActionColumnInitializer',
useVisible() {
const fieldSchema = useFieldSchema();
return fieldSchema['x-component'] !== 'AssociationField.SubTable';
},
}, },
], ],
}); });