fix: assciation field in sub-table should support enable link when readOnly or readPrety (#3390)

This commit is contained in:
katherinehhh 2024-01-16 15:58:18 +08:00 committed by GitHub
parent bc927af640
commit d3704f6807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,7 +89,6 @@ export const TableColumnDesigner = (props) => {
readOnlyMode = 'read-pretty'; readOnlyMode = 'read-pretty';
} }
const isSelectFieldMode = isAssociationField && fieldMode === 'Select'; const isSelectFieldMode = isAssociationField && fieldMode === 'Select';
return ( return (
<GeneralSchemaDesigner disableInitializer> <GeneralSchemaDesigner disableInitializer>
<SchemaSettingsModalItem <SchemaSettingsModalItem
@ -203,7 +202,7 @@ export const TableColumnDesigner = (props) => {
collectionField?.interface, collectionField?.interface,
) && ) &&
!isFileField && !isFileField &&
readOnlyMode === 'read-pretty' && ( (readOnlyMode === 'read-pretty' || field.readPretty || field.readOnly) && (
<SchemaSettingsSwitchItem <SchemaSettingsSwitchItem
title={t('Enable link')} title={t('Enable link')}
checked={fieldSchema['x-component-props']?.enableLink !== false} checked={fieldSchema['x-component-props']?.enableLink !== false}