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
|
fitView
|
||||||
colorMode="dark"
|
colorMode="dark"
|
||||||
connectionMode="loose"
|
connectionMode="loose"
|
||||||
|
isValidConnection={(connection) => connection.source !== connection.target}
|
||||||
>
|
>
|
||||||
<Background
|
<Background
|
||||||
variant={BackgroundVariant.Dots}
|
variant={BackgroundVariant.Dots}
|
||||||
|
|||||||
Reference in New Issue
Block a user