mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-09 15:39:24 +08:00
Merge branch 'main' into next
This commit is contained in:
commit
06696e653e
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user