Add uniqueId function from lodash to cloneFLowWithParent in storeUtils.ts
This commit is contained in:
parent
32bfca24d0
commit
dfc62752f3
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue