fix: disable cascading select component for association field in subtable (#4517)

This commit is contained in:
Katherine 2024-05-30 14:42:56 +08:00 committed by GitHub
parent 9e8335572a
commit 38fa7f8f03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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