Feat/loop break node (#17268)
This commit is contained in:
parent
627a9e2ce1
commit
713902dc47
64 changed files with 1397 additions and 139 deletions
|
|
@ -9,6 +9,7 @@ import { useTranslation } from 'react-i18next'
|
|||
import type { OffsetOptions } from '@floating-ui/react'
|
||||
import {
|
||||
generateNewNode,
|
||||
getNodeCustomTypeByNodeDataType,
|
||||
} from '../utils'
|
||||
import {
|
||||
useAvailableBlocks,
|
||||
|
|
@ -56,6 +57,7 @@ const AddBlock = ({
|
|||
const nodes = getNodes()
|
||||
const nodesWithSameType = nodes.filter(node => node.data.type === type)
|
||||
const { newNode } = generateNewNode({
|
||||
type: getNodeCustomTypeByNodeDataType(type),
|
||||
data: {
|
||||
...NODES_INITIAL_DATA[type],
|
||||
title: nodesWithSameType.length > 0 ? `${t(`workflow.blocks.${type}`)} ${nodesWithSameType.length + 1}` : t(`workflow.blocks.${type}`),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue