refactor: restrict the fields within the configured data scope in sub table (#2394)

This commit is contained in:
katherinehhh 2023-08-06 19:48:03 +08:00 committed by GitHub
parent f992987187
commit 3c161eab86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,6 +75,7 @@ export const TableColumnDesigner = (props) => {
if (fieldSchema['x-read-pretty'] === true) { if (fieldSchema['x-read-pretty'] === true) {
readOnlyMode = 'read-pretty'; readOnlyMode = 'read-pretty';
} }
const isSelectFieldMode = isAssociationField && fieldMode === 'Select';
return ( return (
<GeneralSchemaDesigner disableInitializer> <GeneralSchemaDesigner disableInitializer>
<SchemaSettings.ModalItem <SchemaSettings.ModalItem
@ -109,7 +110,7 @@ export const TableColumnDesigner = (props) => {
dn.refresh(); dn.refresh();
}} }}
/> />
{currentMode && !field.readPretty && ( {isSelectFieldMode && !field.readPretty && !uiSchema?.['x-read-pretty'] && (
<SchemaSettings.ModalItem <SchemaSettings.ModalItem
title={t('Set the data scope')} title={t('Set the data scope')}
schema={ schema={