mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-01 08:59:46 +02:00
fix: don't auto-save on edge delete
Persisting the workflow is a separate intent from "delete this edge", the same way it's separate from "delete this node" (useNodeHandlers doesn't auto-save either). The Save button in the edit dialog conveys the save semantics; trash buttons shouldn't piggy-back on them. After this, all delete paths (node toolbar trash, edge toolbar trash, Backspace on node, Backspace on edge) mark the workflow dirty and leave persistence to Cmd+S or the header Save button. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6292118473
commit
3827dbbf74
1 changed files with 2 additions and 3 deletions
|
|
@ -260,10 +260,9 @@ export default function CustomEdge(props: CustomEdgeProps) {
|
||||||
await saveWorkflow();
|
await saveWorkflow();
|
||||||
}, [id, updateEdge, saveWorkflow]);
|
}, [id, updateEdge, saveWorkflow]);
|
||||||
|
|
||||||
const handleDeleteEdge = useCallback(async () => {
|
const handleDeleteEdge = useCallback(() => {
|
||||||
deleteEdge(id);
|
deleteEdge(id);
|
||||||
await saveWorkflow();
|
}, [id, deleteEdge]);
|
||||||
}, [id, deleteEdge, saveWorkflow]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue