From ec1698a9dad919b19532d3e9f6f46f116b2cd3fb Mon Sep 17 00:00:00 2001 From: "grafana-delivery-bot[bot]" <132647405+grafana-delivery-bot[bot]@users.noreply.github.com> Date: Sat, 4 May 2024 00:37:39 +0300 Subject: [PATCH] [v11.0.x] Canvas: Fix phantom connections persisting after element deletion (#87355) Canvas: Fix phantom connections persisting after element deletion (#87285) (cherry picked from commit 68fa2110d61cdc7a5471f67daa483806dbe12d54) Co-authored-by: Nathan Marrs --- 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 c5de369c463..6be103d31a1 100644 --- a/public/app/plugins/panel/canvas/utils.ts +++ b/public/app/plugins/panel/canvas/utils.ts @@ -320,6 +320,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 = (