Bläddra i källkod

fix: inability-to-add-node-and-change-the-edge (#7303)

tags/0.7.1
AIxGEEK 1 år sedan
förälder
incheckning
04131f86df
Inget konto är kopplat till bidragsgivarens mejladress
1 ändrade filer med 3 tillägg och 0 borttagningar
  1. 3
    0
      web/app/components/workflow/nodes/if-else/use-config.ts

+ 3
- 0
web/app/components/workflow/nodes/if-else/use-config.ts Visa fil

import { useCallback } from 'react' import { useCallback } from 'react'
import produce from 'immer' import produce from 'immer'
import { v4 as uuid4 } from 'uuid' import { v4 as uuid4 } from 'uuid'
import { useUpdateNodeInternals } from 'reactflow'
import type { import type {
Var, Var,
} from '../../types' } from '../../types'
import useAvailableVarList from '@/app/components/workflow/nodes/_base/hooks/use-available-var-list' import useAvailableVarList from '@/app/components/workflow/nodes/_base/hooks/use-available-var-list'


const useConfig = (id: string, payload: IfElseNodeType) => { const useConfig = (id: string, payload: IfElseNodeType) => {
const updateNodeInternals = useUpdateNodeInternals()
const { nodesReadOnly: readOnly } = useNodesReadOnly() const { nodesReadOnly: readOnly } = useNodesReadOnly()
const { handleEdgeDeleteByDeleteBranch } = useEdgesInteractions() const { handleEdgeDeleteByDeleteBranch } = useEdgesInteractions()
const { inputs, setInputs } = useNodeCrud<IfElseNodeType>(id, payload) const { inputs, setInputs } = useNodeCrud<IfElseNodeType>(id, payload)
]) ])
}) })
setInputs(newInputs) setInputs(newInputs)
updateNodeInternals(id)
}, [inputs, setInputs]) }, [inputs, setInputs])


const handleAddCondition = useCallback<HandleAddCondition>((caseId, valueSelector, varItem) => { const handleAddCondition = useCallback<HandleAddCondition>((caseId, valueSelector, varItem) => {

Laddar…
Avbryt
Spara