This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 792cc4fb1ecfec9a4a55e697b92dde70a103ec27
Author: yangyulely <[email protected]>
AuthorDate: Fri Sep 12 04:56:35 2025 +0800

    fix(ui): Connection Form Extras not inferring the correct type (#55492)
    
    (cherry picked from commit a697436c8358979cbeb68aaeb02e0a1d350d3e15)
---
 .../ui/src/components/FlexibleForm/FieldSelector.tsx       | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git 
a/airflow-core/src/airflow/ui/src/components/FlexibleForm/FieldSelector.tsx 
b/airflow-core/src/airflow/ui/src/components/FlexibleForm/FieldSelector.tsx
index 5580ebaa8a4..7dcd092615d 100644
--- a/airflow-core/src/airflow/ui/src/components/FlexibleForm/FieldSelector.tsx
+++ b/airflow-core/src/airflow/ui/src/components/FlexibleForm/FieldSelector.tsx
@@ -89,8 +89,18 @@ const isFieldTime = (fieldType: string, fieldSchema: 
ParamSchema) =>
 
 export const FieldSelector = ({ name, namespace = "default", onUpdate }: 
FlexibleFormElementProps) => {
   // FUTURE: Add support for other types as described in AIP-68 via Plugins
-  const { initialParamDict } = useParamStore(namespace);
-  const param = initialParamDict[name] ?? paramPlaceholder;
+  const { initialParamDict, paramsDict } = useParamStore(namespace);
+
+  // Use current paramsDict (which has actual values) for type inference, fall 
back to initialParamDict for schema
+  const currentParam = paramsDict[name];
+  const initialParam = initialParamDict[name] ?? paramPlaceholder;
+
+  // Create a param object that combines the schema from initialParamDict with 
the value from paramsDict
+  const param: ParamSpec = {
+    ...initialParam,
+    value: currentParam?.value ?? initialParam.value,
+  };
+
   const fieldType = inferType(param);
 
   if (isFieldBool(fieldType)) {

Reply via email to