fix(ui): antd nested form bugs

This commit is contained in:
Fu Diwei
2025-01-06 19:10:29 +08:00
parent 4ba7237326
commit 87e1749553
60 changed files with 1694 additions and 1358 deletions

View File

@@ -4,20 +4,18 @@ import { CloseCircleOutlined as CloseCircleOutlinedIcon, EllipsisOutlined as Ell
import { Button, Card, Dropdown, Popover } from "antd";
import { produce } from "immer";
import { type WorkflowNode } from "@/domain/workflow";
import { useZustandShallowSelector } from "@/hooks";
import { useWorkflowStore } from "@/stores/workflow";
import AddNode from "./AddNode";
import { type SharedNodeProps } from "./_SharedNode";
export type ConditionNodeProps = {
node: WorkflowNode;
export type ConditionNodeProps = SharedNodeProps & {
branchId: string;
branchIndex: number;
disabled?: boolean;
};
const ConditionNode = ({ node, branchId, branchIndex, disabled }: ConditionNodeProps) => {
const ConditionNode = ({ node, disabled, branchId, branchIndex }: ConditionNodeProps) => {
const { t } = useTranslation();
const { updateNode, removeBranch } = useWorkflowStore(useZustandShallowSelector(["updateNode", "removeBranch"]));