TimeComparison: Ensure headerActions are activated (#111224)
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
SceneQueryRunner,
|
||||
sceneUtils,
|
||||
VizPanel,
|
||||
isSceneObject,
|
||||
} from '@grafana/scenes';
|
||||
import { Panel } from '@grafana/schema/dist/esm/index.gen';
|
||||
import { OptionFilter } from 'app/features/dashboard/components/PanelEditor/OptionsPaneOptions';
|
||||
@@ -95,6 +96,16 @@ export class PanelEditor extends SceneObjectBase<PanelEditorState> {
|
||||
|
||||
const deactivateParents = activateSceneObjectAndParentTree(panel);
|
||||
|
||||
// Ensure headerActions are activated
|
||||
const headerActions = panel.state.headerActions;
|
||||
if (headerActions) {
|
||||
(Array.isArray(headerActions) ? headerActions : [headerActions]).forEach((action) => {
|
||||
if (isSceneObject(action)) {
|
||||
action.activate();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.waitForPlugin();
|
||||
|
||||
return () => {
|
||||
|
||||
Reference in New Issue
Block a user