From ada535a6d699bf9dd58b78a19a7906421daa4505 Mon Sep 17 00:00:00 2001
From: "grafana-delivery-bot[bot]"
<132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
Date: Mon, 1 Dec 2025 12:11:14 +0000
Subject: [PATCH] [release-12.3.1] QueryEditorRows: Clear hideSeriesFrom
override on query edit (#114628)
QueryEditorRows: Clear hideSeriesFrom override on query edit (#114315)
clear hideSeriesFrom override on query edit
(cherry picked from commit 0856cac9ad164b34f3418d0d8018fb876ec20fa4)
Co-authored-by: Sergej-Vlasov <37613182+Sergej-Vlasov@users.noreply.github.com>
---
.../PanelDataPane/PanelDataQueriesTab.tsx | 1 +
.../query/components/QueryEditorRows.tsx | 17 +++++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataQueriesTab.tsx b/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataQueriesTab.tsx
index 490084b24ff..4c00f569e19 100644
--- a/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataQueriesTab.tsx
+++ b/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataQueriesTab.tsx
@@ -388,6 +388,7 @@ export function PanelDataQueriesTabRendered({ model }: SceneComponentProps
diff --git a/public/app/features/query/components/QueryEditorRows.tsx b/public/app/features/query/components/QueryEditorRows.tsx
index f65e594bfdb..41b57b4076b 100644
--- a/public/app/features/query/components/QueryEditorRows.tsx
+++ b/public/app/features/query/components/QueryEditorRows.tsx
@@ -9,8 +9,10 @@ import {
HistoryItem,
PanelData,
getDataSourceRef,
+ isSystemOverrideWithRef,
} from '@grafana/data';
import { getDataSourceSrv, reportInteraction } from '@grafana/runtime';
+import { SceneObjectRef, VizPanel } from '@grafana/scenes';
import { DataSourceRef } from '@grafana/schema';
import { getTimeSrv } from 'app/features/dashboard/services/TimeSrv';
import { MIXED_DATASOURCE_NAME } from 'app/plugins/datasource/mixed/MixedDataSource';
@@ -44,6 +46,7 @@ export interface Props {
queryLibraryRef?: string;
onCancelQueryLibraryEdit?: () => void;
isOpen?: boolean;
+ panelRef?: SceneObjectRef;
}
export class QueryEditorRows extends PureComponent {
@@ -63,6 +66,20 @@ export class QueryEditorRows extends PureComponent {
return item;
})
);
+
+ if (this.props.panelRef) {
+ const panel = this.props.panelRef.resolve();
+ const hideSeriesOverrideIndex = panel.state.fieldConfig.overrides.findIndex(
+ isSystemOverrideWithRef('hideSeriesFrom')
+ );
+
+ if (hideSeriesOverrideIndex !== -1) {
+ const newOverrides = [...panel.state.fieldConfig.overrides];
+ newOverrides.splice(hideSeriesOverrideIndex, 1);
+
+ panel.setState({ fieldConfig: { ...panel.state.fieldConfig, overrides: newOverrides } });
+ }
+ }
}
onReplaceQuery(query: DataQuery, index: number) {