allow deletion of blocks within the debugger (#3196)
This commit is contained in:
@@ -576,7 +576,13 @@ function FlowRenderer({
|
||||
</Dialog>
|
||||
<BlockActionContext.Provider
|
||||
value={{
|
||||
deleteNodeCallback: deleteNode,
|
||||
/**
|
||||
* NOTE: defer deletion to next tick to allow React Flow's internal
|
||||
* event handlers to complete; removes a console warning from the
|
||||
* React Flow library
|
||||
*/
|
||||
deleteNodeCallback: (id: string) =>
|
||||
setTimeout(() => deleteNode(id), 0),
|
||||
toggleScriptForNodeCallback: toggleScript,
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -408,7 +408,7 @@ function NodeHeader({
|
||||
)}
|
||||
</button>
|
||||
)}
|
||||
{disabled || debugStore.isDebugMode ? null : (
|
||||
{disabled ? null : (
|
||||
<div>
|
||||
<div
|
||||
className={cn("rounded p-1 hover:bg-muted", {
|
||||
|
||||
Reference in New Issue
Block a user