Merge branch 'main' into next

This commit is contained in:
nocobase[bot] 2025-03-19 13:01:51 +00:00
commit 06696e653e

View File

@ -985,12 +985,11 @@ function useFormItemCollectionField() {
export function useIsAssociationField() {
const collectionField = useFormItemCollectionField();
const isAssociationField = ['obo', 'oho', 'o2o', 'o2m', 'm2m', 'm2o', 'updatedBy', 'createdBy', 'mbm'].includes(
collectionField?.interface,
);
const isAssociationField =
collectionField &&
['hasOne', 'hasMany', 'belongsTo', 'belongsToMany', 'belongsToArray'].includes(collectionField.type);
return isAssociationField;
}
export function useIsFileField() {
const cm = useCollectionManager();
const collectionField = useFormItemCollectionField();