mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
fix: association field appends
This commit is contained in:
parent
b1f4abc9bf
commit
2b6a387db8
@ -1100,6 +1100,7 @@ export const useAssociationNames = (collection) => {
|
||||
const data = schema.reduceProperties((buf, s) => {
|
||||
const collectionfield = s['x-collection-field'] && getCollectionJoinField(s['x-collection-field']);
|
||||
if (collectionfield && ['hasOne', 'hasMany', 'belongsTo', 'belongsToMany'].includes(collectionfield.type)) {
|
||||
buf.push(s.name)
|
||||
if (['Nester', 'SubTable'].includes(s['x-component-props']?.mode)) {
|
||||
associationValues.push(s.name);
|
||||
}
|
||||
@ -1151,5 +1152,6 @@ export const useAssociationNames = (collection) => {
|
||||
};
|
||||
const associations = getAssociationAppends(formSchema);
|
||||
const appends = flattenNestedList(associations);
|
||||
console.log(appends,associations)
|
||||
return { appends, updateAssociationValues: appends.filter((v) => associationValues.includes(v)) };
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user