fix: m2o association field should not allow sub-table as field component (#2865)

This commit is contained in:
katherinehhh 2023-10-19 14:58:01 +08:00 committed by GitHub
parent d3bf9a7a4d
commit 18543f40e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,7 @@ export const useFieldModeOptions = (props?) => {
: [ : [
{ label: t('Select'), value: 'Select' }, { label: t('Select'), value: 'Select' },
{ label: t('Record picker'), value: 'Picker' }, { label: t('Record picker'), value: 'Picker' },
{ label: t('Sub-table'), value: 'SubTable' }, ['m2m', 'o2m'].includes(collectionField.interface) && { label: t('Sub-table'), value: 'SubTable' },
{ label: t('Cascade Select'), value: 'CascadeSelect' }, { label: t('Cascade Select'), value: 'CascadeSelect' },
!isSubTableField && { label: t('Sub-form'), value: 'Nester' }, !isSubTableField && { label: t('Sub-form'), value: 'Nester' },
{ label: t('Sub-form(Popover)'), value: 'PopoverNester' }, { label: t('Sub-form(Popover)'), value: 'PopoverNester' },