From ed10322af2171832c6f334ca299905ee8d594c5d Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Wed, 24 Apr 2024 17:50:02 -0300 Subject: [PATCH] Update setNodes and setEdges functions in flowStore.ts to skip saving changes when skipSave parameter is true --- src/frontend/src/components/cardComponent/index.tsx | 5 +++-- src/frontend/src/modals/IOModal/index.tsx | 10 +++++----- src/frontend/src/stores/flowStore.ts | 8 ++++---- src/frontend/src/types/zustand/flow/index.ts | 4 ++-- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/frontend/src/components/cardComponent/index.tsx b/src/frontend/src/components/cardComponent/index.tsx index 21701f459..20af31351 100644 --- a/src/frontend/src/components/cardComponent/index.tsx +++ b/src/frontend/src/components/cardComponent/index.tsx @@ -63,8 +63,8 @@ export default function CollectionCardComponent({ useEffect(() => { if (currentFlowId && playground) { - setNodes(currentFlow?.data?.nodes ?? []); - setEdges(currentFlow?.data?.edges ?? []); + setNodes(currentFlow?.data?.nodes ?? [],true); + setEdges(currentFlow?.data?.edges ?? [],true); } }, [currentFlowId]); @@ -364,6 +364,7 @@ export default function CollectionCardComponent({ {button && button} {playground &&