From 4235b845d8b54ef3ddcb45d0ae325aeb982913f3 Mon Sep 17 00:00:00 2001 From: Junyi Date: Thu, 28 Nov 2024 10:30:57 +0800 Subject: [PATCH 1/2] fix(client): use children component when nullable is false (#5746) --- .../core/client/src/schema-component/antd/variable/Input.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/client/src/schema-component/antd/variable/Input.tsx b/packages/core/client/src/schema-component/antd/variable/Input.tsx index 3d61b74a4e..66a0f2e6ec 100644 --- a/packages/core/client/src/schema-component/antd/variable/Input.tsx +++ b/packages/core/client/src/schema-component/antd/variable/Input.tsx @@ -460,7 +460,7 @@ export function Input(props: VariableInputProps) { ) : (
- {children && isFieldValue ? ( + {children && (isFieldValue || !nullable) ? ( children ) : ConstantComponent ? ( Date: Thu, 28 Nov 2024 12:26:11 +0800 Subject: [PATCH 2/2] fix: multiple relational fields are linked to the same table (#5744) --- packages/core/client/src/schema-initializer/utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/client/src/schema-initializer/utils.ts b/packages/core/client/src/schema-initializer/utils.ts index 9e4d1de0d2..57f6c87868 100644 --- a/packages/core/client/src/schema-initializer/utils.ts +++ b/packages/core/client/src/schema-initializer/utils.ts @@ -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) => { - if (s[key] === action) { + if (s[key] === action && (!name || s.name === name)) { return s; } const c = s.reduceProperties((buf, s) => { - if (s[key] === action) { + if (s[key] === action && (!name || s.name === name)) { return s; } return buf;