AngularPanels: Fixes issue with discrete panel that used the initialized event (#30133)

This commit is contained in:
Torkel Ödegaard 2021-01-08 14:25:37 +01:00 committed by GitHub
parent e4607a4a19
commit 80130d1c6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,7 @@ export const PanelEvents = {
dataSnapshotLoad: eventFactory<DataQueryResponseData[]>('data-snapshot-load'), dataSnapshotLoad: eventFactory<DataQueryResponseData[]>('data-snapshot-load'),
editModeInitialized: eventFactory('init-edit-mode'), editModeInitialized: eventFactory('init-edit-mode'),
initPanelActions: eventFactory<AngularPanelMenuItem[]>('init-panel-actions'), initPanelActions: eventFactory<AngularPanelMenuItem[]>('init-panel-actions'),
initialized: eventFactory('panel-initialized'),
panelTeardown: eventFactory('panel-teardown'), panelTeardown: eventFactory('panel-teardown'),
render: eventFactory<any>('render'), render: eventFactory<any>('render'),
}; };

View File

@ -51,6 +51,7 @@ export class PanelCtrl {
panelDidMount() { panelDidMount() {
this.events.emit(PanelEvents.componentDidMount); this.events.emit(PanelEvents.componentDidMount);
this.events.emit(PanelEvents.initialized);
this.dashboard.panelInitialized(this.panel); this.dashboard.panelInitialized(this.panel);
} }