mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-02 03:02:19 +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 data = schema.reduceProperties((buf, s) => {
|
||||||
const collectionfield = s['x-collection-field'] && getCollectionJoinField(s['x-collection-field']);
|
const collectionfield = s['x-collection-field'] && getCollectionJoinField(s['x-collection-field']);
|
||||||
if (collectionfield && ['hasOne', 'hasMany', 'belongsTo', 'belongsToMany'].includes(collectionfield.type)) {
|
if (collectionfield && ['hasOne', 'hasMany', 'belongsTo', 'belongsToMany'].includes(collectionfield.type)) {
|
||||||
|
buf.push(s.name)
|
||||||
if (['Nester', 'SubTable'].includes(s['x-component-props']?.mode)) {
|
if (['Nester', 'SubTable'].includes(s['x-component-props']?.mode)) {
|
||||||
associationValues.push(s.name);
|
associationValues.push(s.name);
|
||||||
}
|
}
|
||||||
@ -1151,5 +1152,6 @@ export const useAssociationNames = (collection) => {
|
|||||||
};
|
};
|
||||||
const associations = getAssociationAppends(formSchema);
|
const associations = getAssociationAppends(formSchema);
|
||||||
const appends = flattenNestedList(associations);
|
const appends = flattenNestedList(associations);
|
||||||
|
console.log(appends,associations)
|
||||||
return { appends, updateAssociationValues: appends.filter((v) => associationValues.includes(v)) };
|
return { appends, updateAssociationValues: appends.filter((v) => associationValues.includes(v)) };
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user