set sse data when changing nodes and edges to empty
This commit is contained in:
parent
221776c2d4
commit
4ba94fbd29
1 changed files with 2 additions and 2 deletions
|
|
@ -87,7 +87,7 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
|
|||
let newChange = typeof change === "function" ? change(get().nodes) : change;
|
||||
let newEdges = cleanEdges(newChange, get().edges);
|
||||
|
||||
set({ edges: newEdges, nodes: newChange, flowState: undefined });
|
||||
set({ edges: newEdges, nodes: newChange, flowState: undefined, isBuilt: false, sseData: {} });
|
||||
|
||||
const flowsManager = useFlowsManagerStore.getState()
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
|
|||
setEdges: (change) => {
|
||||
let newChange = typeof change === "function" ? change(get().edges) : change;
|
||||
|
||||
set({ edges: newChange, flowState: undefined });
|
||||
set({ edges: newChange, flowState: undefined, isBuilt: false, sseData: {} });
|
||||
|
||||
const flowsManager = useFlowsManagerStore.getState()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue