fix: field component options appears in non-association interface (#1220)

This commit is contained in:
Dunqing 2022-12-08 19:08:24 +08:00 committed by GitHub
parent a951d49f55
commit 29e83515b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,12 @@ export const useFieldComponentOptions = () => {
const { t } = useTranslation();
const fieldComponentOptions = useMemo(() => {
if (!collectionField?.interface) return;
if (
!['o2o', 'oho', 'obo', 'o2m', 'linkTo', 'm2o', 'm2m']
.includes(collectionField.interface)
)
return;
switch (collectionField.interface) {
case 'o2m':
return [