fix: multiple relational fields are linked to the same table (#5744)

This commit is contained in:
Katherine 2024-11-28 12:26:11 +08:00 committed by GitHub
parent 05d973ab02
commit 15d274e5be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -83,13 +83,13 @@ export const useRemoveGridFormItem = () => {
}; };
}; };
export const findTableColumn = (schema: Schema, key: string, action: string, deepth = 0) => { export const findTableColumn = (schema: Schema, key: string, action: string, name: string) => {
return schema.reduceProperties((buf, s) => { return schema.reduceProperties((buf, s) => {
if (s[key] === action) { if (s[key] === action && (!name || s.name === name)) {
return s; return s;
} }
const c = s.reduceProperties((buf, s) => { const c = s.reduceProperties((buf, s) => {
if (s[key] === action) { if (s[key] === action && (!name || s.name === name)) {
return s; return s;
} }
return buf; return buf;