Add uniqueId function from lodash to cloneFLowWithParent in storeUtils.ts

This commit is contained in:
anovazzi1 2024-04-27 20:53:29 -03:00
commit dfc62752f3

View file

@ -1,4 +1,4 @@
import { cloneDeep } from "lodash";
import { cloneDeep, uniqueId } from "lodash";
import { Node } from "reactflow";
import { FlowType, NodeDataType } from "../types/flow";
import { isInputNode, isOutputNode } from "./reactflowUtils";
@ -14,6 +14,9 @@ export default function cloneFLowWithParent(
if(!keepId){
childFLow.id = "";
}
else{
childFLow.id = uniqueId()+"-"+childFLow.id;
}
childFLow.is_component = is_component;
return childFLow;
}