fix: allow parent-to-child connections in React Flow
React Flow blocks connections involving a parentId parent/child pair by default to prevent hierarchy cycles. Override with isValidConnection that only rejects self-loops (source === target), allowing explicit edges between Proxmox container nodes and their nested VMs/LXCs.
This commit is contained in:
@@ -58,6 +58,7 @@ export function CanvasContainer({ onConnect: onConnectProp, onEdgeDoubleClick }:
|
||||
fitView
|
||||
colorMode="dark"
|
||||
connectionMode="loose"
|
||||
isValidConnection={(connection) => connection.source !== connection.target}
|
||||
>
|
||||
<Background
|
||||
variant={BackgroundVariant.Dots}
|
||||
|
||||
Reference in New Issue
Block a user