mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 16:15:42 -06:00
Canvas: Reload scene in panel view mode (#55122)
This commit is contained in:
parent
9f45e2e706
commit
446b17f308
@ -63,7 +63,7 @@ export class CanvasPanel extends Component<Props, State> {
|
|||||||
this.scene.inlineEditingCallback = this.openInlineEdit;
|
this.scene.inlineEditingCallback = this.openInlineEdit;
|
||||||
|
|
||||||
this.subs.add(
|
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
|
// Remove current selection when entering edit mode for any panel in dashboard
|
||||||
this.scene.clearCurrentSelection();
|
this.scene.clearCurrentSelection();
|
||||||
this.closeInlineEdit();
|
this.closeInlineEdit();
|
||||||
@ -71,9 +71,14 @@ export class CanvasPanel extends Component<Props, State> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
this.subs.add(
|
this.subs.add(
|
||||||
this.props.eventBus.subscribe(PanelEditExitedEvent, (evt) => {
|
this.props.eventBus.subscribe(PanelEditExitedEvent, (evt: PanelEditExitedEvent) => {
|
||||||
if (this.props.id === evt.payload) {
|
if (this.props.id === evt.payload) {
|
||||||
this.needsReload = true;
|
this.needsReload = true;
|
||||||
|
this.scene.load(
|
||||||
|
this.props.options.root,
|
||||||
|
this.props.options.inlineEditing,
|
||||||
|
this.props.options.showAdvancedTypes
|
||||||
|
);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user