mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
Canvas: Remove deleted connections from source (#65321)
This commit is contained in:
@@ -6,6 +6,7 @@ import { notFoundItem } from 'app/features/canvas/elements/notFound';
|
||||
import { DimensionContext } from 'app/features/dimensions';
|
||||
import { LayerActionID } from 'app/plugins/panel/canvas/types';
|
||||
|
||||
import { updateConnectionsForSource } from '../../../plugins/panel/canvas/utils';
|
||||
import { CanvasElementItem } from '../element';
|
||||
import { HorizontalConstraint, Placement, VerticalConstraint } from '../types';
|
||||
|
||||
@@ -114,6 +115,7 @@ export class FrameState extends ElementState {
|
||||
switch (action) {
|
||||
case LayerActionID.Delete:
|
||||
this.elements = this.elements.filter((e) => e !== element);
|
||||
updateConnectionsForSource(element, this.scene);
|
||||
this.scene.byName.delete(element.options.name);
|
||||
this.scene.save();
|
||||
this.reinitializeMoveable();
|
||||
|
||||
Reference in New Issue
Block a user