diff --git a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/add-field.tsx b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/add-field.tsx index ab28233841..eba94e85dd 100644 --- a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/add-field.tsx +++ b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/add-field.tsx @@ -12,7 +12,10 @@ const AddField = () => { const handleAddField = useCallback(() => { setIsAddingNewField(true) - emit('addField', { path: [] }) + // fix: when user change the last property type, the 'hoveringProperty' value will be reset by 'setHoveringPropertyDebounced(null)', that cause the EditCard not showing + setTimeout(() => { + emit('addField', { path: [] }) + }, 100) }, [setIsAddingNewField, emit]) return ( diff --git a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/edit-card/index.tsx b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/edit-card/index.tsx index 4aa0f99d3f..2733fcc11f 100644 --- a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/edit-card/index.tsx +++ b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/edit-card/index.tsx @@ -122,7 +122,8 @@ const EditCard: FC = ({ }, [emit, path, parentPath, fields, currentFields]) const handlePropertyNameChange = useCallback((e: React.ChangeEvent) => { - setCurrentFields(prev => ({ ...prev, name: e.target.value })) + // fix: when user add name contains space, the variable reference will not work + setCurrentFields(prev => ({ ...prev, name: e.target.value?.trim() })) }, []) const handlePropertyNameBlur = useCallback(() => { diff --git a/web/package.json b/web/package.json index f998896e2b..032c713333 100644 --- a/web/package.json +++ b/web/package.json @@ -74,7 +74,7 @@ "cmdk": "^1.1.1", "copy-to-clipboard": "^3.3.3", "cron-parser": "^5.4.0", - "dayjs": "^1.11.18", + "dayjs": "^1.11.19", "decimal.js": "^10.6.0", "dompurify": "^3.3.0", "echarts": "^5.6.0", diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index 4cfcf551d2..a2328052b0 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -151,8 +151,8 @@ importers: specifier: ^5.4.0 version: 5.4.0 dayjs: - specifier: ^1.11.18 - version: 1.11.18 + specifier: ^1.11.19 + version: 1.11.19 decimal.js: specifier: ^10.6.0 version: 10.6.0 @@ -4405,8 +4405,8 @@ packages: dagre-d3-es@7.0.11: resolution: {integrity: sha512-tvlJLyQf834SylNKax8Wkzco/1ias1OPw8DcUMDE7oUIoSEW25riQVuiu/0OWEFqT0cxHT3Pa9/D82Jr47IONw==} - dayjs@1.11.18: - resolution: {integrity: sha512-zFBQ7WFRvVRhKcWoUh+ZA1g2HVgUbsZm9sbddh8EC5iv93sui8DVVz1Npvz+r6meo9VKfa8NyLWBsQK1VvIKPA==} + dayjs@1.11.19: + resolution: {integrity: sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==} debounce@1.2.1: resolution: {integrity: sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==} @@ -12000,7 +12000,7 @@ snapshots: dependencies: '@babel/runtime': 7.28.4 '@types/js-cookie': 3.0.6 - dayjs: 1.11.18 + dayjs: 1.11.19 intersection-observer: 0.12.2 js-cookie: 3.0.5 lodash: 4.17.21 @@ -12944,7 +12944,7 @@ snapshots: d3: 7.9.0 lodash-es: 4.17.21 - dayjs@1.11.18: {} + dayjs@1.11.19: {} debounce@1.2.1: {} @@ -15298,7 +15298,7 @@ snapshots: d3: 7.9.0 d3-sankey: 0.12.3 dagre-d3-es: 7.0.11 - dayjs: 1.11.18 + dayjs: 1.11.19 dompurify: 3.3.0 katex: 0.16.25 khroma: 2.1.0