fix: updateAssociationValues (#1903)
This commit is contained in:
parent
920bdf8705
commit
0318034b7c
@ -1176,12 +1176,17 @@ export const useAssociationNames = (collection) => {
|
|||||||
if (schema) {
|
if (schema) {
|
||||||
const associations = getAssociationAppends(schema);
|
const associations = getAssociationAppends(schema);
|
||||||
const appends = flattenNestedList(associations);
|
const appends = flattenNestedList(associations);
|
||||||
console.log(appends, associations);
|
return {
|
||||||
return { appends, updateAssociationValues: appends.filter((v) => associationValues.includes(v)) };
|
appends,
|
||||||
|
updateAssociationValues: appends.filter((item) => associationValues.some((suffix) => item.endsWith(suffix))),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
if (!schema) {
|
if (!schema) {
|
||||||
const associations = getAssociationAppends(formSchema);
|
const associations = getAssociationAppends(formSchema);
|
||||||
const appends = flattenNestedList(associations);
|
const appends = flattenNestedList(associations);
|
||||||
return { appends, updateAssociationValues: appends.filter((v) => associationValues.includes(v)) };
|
return {
|
||||||
|
appends,
|
||||||
|
updateAssociationValues: appends.filter((item) => associationValues.some((suffix) => item.endsWith(suffix))),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user