fix: useAssociationNames (#2714)
This commit is contained in:
parent
291859d6b5
commit
e90eec7031
@ -1125,7 +1125,7 @@ export const useAssociationNames = () => {
|
|||||||
const isAssociationSubfield = s.name.includes('.');
|
const isAssociationSubfield = s.name.includes('.');
|
||||||
const isAssociationField =
|
const isAssociationField =
|
||||||
collectionfield && ['hasOne', 'hasMany', 'belongsTo', 'belongsToMany'].includes(collectionfield.type);
|
collectionfield && ['hasOne', 'hasMany', 'belongsTo', 'belongsToMany'].includes(collectionfield.type);
|
||||||
const isTreeCollection = isAssociationField && getCollection(collectionfield.target).template === 'tree';
|
const isTreeCollection = isAssociationField && getCollection(collectionfield.target)?.template === 'tree';
|
||||||
if (collectionfield && (isAssociationField || isAssociationSubfield) && s['x-component'] !== 'TableField') {
|
if (collectionfield && (isAssociationField || isAssociationSubfield) && s['x-component'] !== 'TableField') {
|
||||||
const fieldPath = !isAssociationField && isAssociationSubfield ? getAssociationPath(s.name) : s.name;
|
const fieldPath = !isAssociationField && isAssociationSubfield ? getAssociationPath(s.name) : s.name;
|
||||||
const path = prefix === '' || !prefix ? fieldPath : prefix + '.' + fieldPath;
|
const path = prefix === '' || !prefix ? fieldPath : prefix + '.' + fieldPath;
|
||||||
|
Loading…
Reference in New Issue
Block a user