fix: edges moving on just cloned flows (#6819)
* Changed export modal to just download after flow is built * Changed cleanEdge to set edges animated to false * Updated starter projects and tests to remove animated from edge * update market research json to get global variable
This commit is contained in:
parent
75ddab6011
commit
7b3dc0b453
5 changed files with 1072 additions and 1259 deletions
|
|
@ -21,6 +21,7 @@ const ExportModal = forwardRef(
|
|||
const setNoticeData = useAlertStore((state) => state.setNoticeData);
|
||||
const [checked, setChecked] = useState(false);
|
||||
const currentFlow = useFlowStore((state) => state.currentFlow);
|
||||
const isBuilding = useFlowStore((state) => state.isBuilding);
|
||||
useEffect(() => {
|
||||
setName(currentFlow?.name ?? "");
|
||||
setDescription(currentFlow?.description ?? "");
|
||||
|
|
@ -105,7 +106,7 @@ const ExportModal = forwardRef(
|
|||
</span>
|
||||
</BaseModal.Content>
|
||||
|
||||
<BaseModal.Footer submit={{ label: "Export" }} />
|
||||
<BaseModal.Footer submit={{ label: "Export", loading: isBuilding }} />
|
||||
</BaseModal>
|
||||
);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -55,7 +55,9 @@ export function checkChatInput(nodes: Node[]) {
|
|||
}
|
||||
|
||||
export function cleanEdges(nodes: AllNodeType[], edges: EdgeType[]) {
|
||||
let newEdges = cloneDeep(edges);
|
||||
let newEdges: EdgeType[] = cloneDeep(
|
||||
edges.map((edge) => ({ ...edge, selected: false, animated: false })),
|
||||
);
|
||||
edges.forEach((edge) => {
|
||||
// check if the source and target node still exists
|
||||
const sourceNode = nodes.find((node) => node.id === edge.source);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue