From 446b17f3081f73f488da5f2b868ea0d96b22304c Mon Sep 17 00:00:00 2001 From: Adela Almasan <88068998+adela-almasan@users.noreply.github.com> Date: Tue, 13 Sep 2022 15:22:29 -0500 Subject: [PATCH] Canvas: Reload scene in panel view mode (#55122) --- public/app/plugins/panel/canvas/CanvasPanel.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/canvas/CanvasPanel.tsx b/public/app/plugins/panel/canvas/CanvasPanel.tsx index aa08d7b5827..eb4b715bf1b 100644 --- a/public/app/plugins/panel/canvas/CanvasPanel.tsx +++ b/public/app/plugins/panel/canvas/CanvasPanel.tsx @@ -63,7 +63,7 @@ export class CanvasPanel extends Component { this.scene.inlineEditingCallback = this.openInlineEdit; this.subs.add( - this.props.eventBus.subscribe(PanelEditEnteredEvent, (evt) => { + this.props.eventBus.subscribe(PanelEditEnteredEvent, (evt: PanelEditEnteredEvent) => { // Remove current selection when entering edit mode for any panel in dashboard this.scene.clearCurrentSelection(); this.closeInlineEdit(); @@ -71,9 +71,14 @@ export class CanvasPanel extends Component { ); this.subs.add( - this.props.eventBus.subscribe(PanelEditExitedEvent, (evt) => { + this.props.eventBus.subscribe(PanelEditExitedEvent, (evt: PanelEditExitedEvent) => { if (this.props.id === evt.payload) { this.needsReload = true; + this.scene.load( + this.props.options.root, + this.props.options.inlineEditing, + this.props.options.showAdvancedTypes + ); } }) );