Skip to content

Commit f94c5ae

Browse files
committed
refactor: update onBeforeDelete to match asynchronous function signature
- Modified the onBeforeDelete function to be asynchronous, allowing for better handling of pending node removals. - This change improves the deletion logic by ensuring that node states are managed correctly before deletion occurs.
1 parent fa387ba commit f94c5ae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/DiagramView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ const DiagramView = ({
392392
});
393393
pendingNodeRemovalsRef.current.clear();
394394
}}
395-
onBeforeDelete={({ nodes }) => {
395+
onBeforeDelete={async ({ nodes }) => {
396396
pendingNodeRemovalsRef.current = new Set(
397397
nodes.map((node) => node.id),
398398
);

0 commit comments

Comments
 (0)