Browse Source
When deleting a node via the canvas (Delete key), React Flow fires onNodesChange(remove) then onEdgesChange(remove) synchronously. Previously this created two undo entries, requiring two undos and leaving an intermediate state with orphaned edges. Now onNodesChange sets a microtask-scoped flag that tells onEdgesChange to skip its checkpoint, collapsing both into a single undo entry. Added integration test verifying single-undo restores node + edges. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>handoff-20260429-1057
2 changed files with 68 additions and 3 deletions
Loading…
Reference in new issue