Commit 221042c2 by Andreas Opferkuch Committed by GitHub

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.
parent a9f39a41
...@@ -20,8 +20,8 @@ export default class QueryRows extends PureComponent<QueryRowsProps> { ...@@ -20,8 +20,8 @@ export default class QueryRows extends PureComponent<QueryRowsProps> {
const { className = '', exploreEvents, exploreId, queryKeys } = this.props; const { className = '', exploreEvents, exploreId, queryKeys } = this.props;
return ( return (
<div className={className}> <div className={className}>
{queryKeys.map((_, index) => { {queryKeys.map((key, index) => {
return <QueryRow key={index} exploreEvents={exploreEvents} exploreId={exploreId} index={index} />; return <QueryRow key={key} exploreEvents={exploreEvents} exploreId={exploreId} index={index} />;
})} })}
</div> </div>
); );
......
...@@ -302,6 +302,7 @@ export const itemReducer = (state: ExploreItemState = makeExploreItemState(), ac ...@@ -302,6 +302,7 @@ export const itemReducer = (state: ExploreItemState = makeExploreItemState(), ac
latency: 0, latency: 0,
queryResponse: createEmptyQueryResponse(), queryResponse: createEmptyQueryResponse(),
loading: false, loading: false,
queryKeys: [],
supportedModes, supportedModes,
mode: mode ?? newMode, mode: mode ?? newMode,
originPanelId: state.urlState && state.urlState.originPanelId, originPanelId: state.urlState && state.urlState.originPanelId,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment