From 68fa2110d61cdc7a5471f67daa483806dbe12d54 Mon Sep 17 00:00:00 2001 From: Nathan Marrs Date: Fri, 3 May 2024 15:17:05 -0600 Subject: [PATCH] Canvas: Fix phantom connections persisting after element deletion (#87285) --- public/app/plugins/panel/canvas/utils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/app/plugins/panel/canvas/utils.ts b/public/app/plugins/panel/canvas/utils.ts index 66009a0dbd6..dfabad08313 100644 --- a/public/app/plugins/panel/canvas/utils.ts +++ b/public/app/plugins/panel/canvas/utils.ts @@ -322,6 +322,9 @@ export function updateConnectionsForSource(element: ElementState, scene: Scene) const connections = sourceConnections.filter((con) => con.targetName !== element.getName()); connection.source.onChange({ ...connection.source.options, connections }); }); + + // Update scene connection state to clear out old connections + scene.connections.updateState(); } export const calculateCoordinates = (