Skip to content

Commit

Permalink
Unselect nodes for undo history (#2961)
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyballentine authored Jun 27, 2024
1 parent 03eb7c5 commit 3acfb0f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/renderer/components/HistoryProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ export const HistoryProvider = memo(
if (selfUpdate) return noop;

const id = setTimeout(() => {
historyRef.current = historyRef.current.commit([getNodes(), getEdges()]);
historyRef.current = historyRef.current.commit([
getNodes().map((n) => ({ ...n, selected: false })),
getEdges(),
]);
}, 250);
return () => clearTimeout(id);
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down

0 comments on commit 3acfb0f

Please sign in to comment.