mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
fix: belongsToArray (#6173)
This commit is contained in:
parent
0185ecee4c
commit
554cad3353
@ -57,7 +57,5 @@ export const AssociationProvider: FC<AssociationProviderProps> = (props) => {
|
|||||||
*/
|
*/
|
||||||
export const useAssociationName = () => {
|
export const useAssociationName = () => {
|
||||||
const field = useCollectionField();
|
const field = useCollectionField();
|
||||||
return field && ['belongsToMany', 'belongsTo', 'hasMany', 'hasOne'].includes(field.type)
|
return field?.target ? `${field.collectionName}.${field.name}` : null;
|
||||||
? `${field.collectionName}.${field.name}`
|
|
||||||
: null;
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user