DataTrails: Do not create a new VizPanel every activation (#85693)

This commit is contained in:
Torkel Ödegaard
2024-04-09 08:39:26 +02:00
committed by GitHub
parent 509691b416
commit 4f290ebf99
2 changed files with 7 additions and 10 deletions

View File

@@ -72,8 +72,6 @@ function getStyles(theme: GrafanaTheme2) {
}
function buildGraphTopView() {
const bodyAutoVizPanel = new AutoVizPanel({});
return new SceneFlexLayout({
direction: 'column',
$behaviors: [new behaviors.CursorSync({ key: 'metricCrosshairSync', sync: DashboardCursorSync.Crosshair })],
@@ -81,7 +79,7 @@ function buildGraphTopView() {
new SceneFlexItem({
minHeight: MAIN_PANEL_MIN_HEIGHT,
maxHeight: MAIN_PANEL_MAX_HEIGHT,
body: bodyAutoVizPanel,
body: new AutoVizPanel({}),
}),
new SceneFlexItem({
ySizing: 'content',