mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-02 03:02:19 +08:00
fix: sub-table-appends
This commit is contained in:
parent
222135dc5f
commit
e4bf8ee644
@ -1136,8 +1136,12 @@ export const useAssociationNames = (collection) => {
|
||||
if (Array.isArray(list[i])) {
|
||||
`${prefix}` !== `${list[i][0]}` && flattenHelper(list[i], `${prefix}.${list[i][0]}`);
|
||||
} else {
|
||||
const str = prefix.replaceAll(`${list[i]}`, '').replace('..', '.').trim();
|
||||
!list.includes(str) && flattenedList.push(`${str}${list[i]}`);
|
||||
const str = prefix.replaceAll(`.${list[i]}`, '').trim();
|
||||
if (!str) {
|
||||
!list.includes(str) && flattenedList.push(`${list[i]}`);
|
||||
} else {
|
||||
!list.includes(str) ? flattenedList.push(`${str}.${list[i]}`) : flattenedList.push(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1153,9 +1157,7 @@ export const useAssociationNames = (collection) => {
|
||||
}, data);
|
||||
return data.filter((g) => g.length);
|
||||
};
|
||||
const data = getAssociationAppends(formSchema);
|
||||
const associations = data.filter((g) => g.length);
|
||||
const associations = getAssociationAppends(formSchema);
|
||||
const appends = flattenNestedList(associations);
|
||||
|
||||
return { appends, updateAssociationValues: appends.filter((v) => associationValues.includes(v)) };
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user