From e816bb6953486e37dd39d93252aa9b94fe5d4ec1 Mon Sep 17 00:00:00 2001 From: moklick Date: Wed, 9 Oct 2024 17:11:27 +0200 Subject: [PATCH] chore(changesets): add --- .changeset/stale-owls-turn.md | 5 +++++ packages/react/src/store/index.ts | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/stale-owls-turn.md diff --git a/.changeset/stale-owls-turn.md b/.changeset/stale-owls-turn.md new file mode 100644 index 00000000..60687a4d --- /dev/null +++ b/.changeset/stale-owls-turn.md @@ -0,0 +1,5 @@ +--- +'@xyflow/react': patch +--- + +Fix internal behaviour that mutated user nodes which led to an issue with Redux and immer diff --git a/packages/react/src/store/index.ts b/packages/react/src/store/index.ts index c4dc42b6..067f4093 100644 --- a/packages/react/src/store/index.ts +++ b/packages/react/src/store/index.ts @@ -20,6 +20,7 @@ import { import { applyEdgeChanges, applyNodeChanges, createSelectionChange, getSelectionChanges } from '../utils/changes'; import getInitialState from './initialState'; import type { ReactFlowState, Node, Edge, UnselectNodesAndEdgesParams, FitViewOptions } from '../types'; + const createStore = ({ nodes, edges,