fix: datatrails: hide graphs when previews disabled (#81423)

fix: datatrails: hide graph when previews disabled
This commit is contained in:
Darren Janeczek 2024-01-29 08:41:53 -05:00 committed by GitHub
parent 811ce04390
commit 329440cb1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -168,11 +168,11 @@ export class MetricSelectScene extends SceneObjectBase<MetricSelectSceneState> {
for (let index = 0; index < metricsList.length; index++) {
const metric = metricsList[index];
if (metric.itemRef && metric.isPanel) {
children.push(metric.itemRef.resolve());
continue;
}
if (this.state.showPreviews) {
if (metric.itemRef && metric.isPanel) {
children.push(metric.itemRef.resolve());
continue;
}
const panel = getPreviewPanelFor(metric.name, index);
metric.itemRef = panel.getRef();
metric.isPanel = true;