Prevent all workflow node and edge deletions made through the UI (#9918)
## Old In the demo, I press the `Delete` key multiple times, and it deletes the nodes. https://github.com/user-attachments/assets/75bf84d3-b182-488c-a781-bbe236985142 ## New https://github.com/user-attachments/assets/4ae4f387-e143-4ce8-8140-6cb2c549f5d2
This commit is contained in:
committed by
GitHub
parent
ce296fae4f
commit
85df6ada52
@ -227,6 +227,10 @@ export const WorkflowDiagramCanvasBase = ({
|
||||
edges={edges}
|
||||
onNodesChange={handleNodesChange}
|
||||
onEdgesChange={handleEdgesChange}
|
||||
onBeforeDelete={async () => {
|
||||
// Abort all non-programmatic deletions
|
||||
return false;
|
||||
}}
|
||||
proOptions={{ hideAttribution: true }}
|
||||
multiSelectionKeyCode={null}
|
||||
nodesFocusable={false}
|
||||
|
||||
Reference in New Issue
Block a user