From 221042c29370898955cf2a99d664e3631e282417 Mon Sep 17 00:00:00 2001 From: Andreas Opferkuch Date: Fri, 8 May 2020 17:49:47 +0200 Subject: [PATCH] Explore: Revert QueryRows refactor (#24444) While query fields should not rely on getting unmounted when the data source changes (and instead react to that change in e.g. componentDidUpdate()), query fields other than PromQueryField still rely on this. --- public/app/features/explore/QueryRows.tsx | 4 ++-- public/app/features/explore/state/reducers.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/app/features/explore/QueryRows.tsx b/public/app/features/explore/QueryRows.tsx index c5b29238c78..4b5a16ef781 100644 --- a/public/app/features/explore/QueryRows.tsx +++ b/public/app/features/explore/QueryRows.tsx @@ -20,8 +20,8 @@ export default class QueryRows extends PureComponent { const { className = '', exploreEvents, exploreId, queryKeys } = this.props; return (
- {queryKeys.map((_, index) => { - return ; + {queryKeys.map((key, index) => { + return ; })}
); diff --git a/public/app/features/explore/state/reducers.ts b/public/app/features/explore/state/reducers.ts index aa3d194eba8..e3bf248952c 100644 --- a/public/app/features/explore/state/reducers.ts +++ b/public/app/features/explore/state/reducers.ts @@ -302,6 +302,7 @@ export const itemReducer = (state: ExploreItemState = makeExploreItemState(), ac latency: 0, queryResponse: createEmptyQueryResponse(), loading: false, + queryKeys: [], supportedModes, mode: mode ?? newMode, originPanelId: state.urlState && state.urlState.originPanelId,