diff --git a/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx b/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx index d2b54f88aff..a5cfdb9b1ae 100644 --- a/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx +++ b/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx @@ -18,6 +18,7 @@ import { activePanelSubject, InstanceState } from '../../CanvasPanel'; import { addStandardCanvasEditorOptions } from '../../module'; import { InlineEditTabs } from '../../types'; import { getElementTypes, onAddItem } from '../../utils'; +import { getConnectionEditor } from '../connectionEditor'; import { getElementEditor } from '../element/elementEditor'; import { getLayerEditor } from '../layer/layerEditor'; @@ -42,6 +43,17 @@ export function InlineEditBody() { builder.addNestedOptions(getLayerEditor(instanceState)); } + const selectedConnection = state.selectedConnection; + if (selectedConnection && activeTab === InlineEditTabs.SelectedElement) { + builder.addNestedOptions( + getConnectionEditor({ + category: [`Selected connection`], + connection: selectedConnection, + scene: state.scene, + }) + ); + } + const selection = state.selected; if (selection?.length === 1 && activeTab === InlineEditTabs.SelectedElement) { const element = selection[0]; @@ -82,7 +94,10 @@ export function InlineEditBody() { const rootLayer: FrameState | undefined = instanceState?.layer; const noElementSelected = - instanceState && activeTab === InlineEditTabs.SelectedElement && instanceState.selected.length === 0; + instanceState && + activeTab === InlineEditTabs.SelectedElement && + instanceState.selected.length === 0 && + instanceState.selectedConnection === undefined; return ( <>