Skip to content

Commit

Permalink
Explore: Revert QueryRows refactor (#24444)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
s-h-a-d-o-w committed May 8, 2020
1 parent a9f39a4 commit 221042c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/app/features/explore/QueryRows.tsx
Expand Up @@ -20,8 +20,8 @@ export default class QueryRows extends PureComponent<QueryRowsProps> {
const { className = '', exploreEvents, exploreId, queryKeys } = this.props;
return (
<div className={className}>
{queryKeys.map((_, index) => {
return <QueryRow key={index} exploreEvents={exploreEvents} exploreId={exploreId} index={index} />;
{queryKeys.map((key, index) => {
return <QueryRow key={key} exploreEvents={exploreEvents} exploreId={exploreId} index={index} />;
})}
</div>
);
Expand Down
1 change: 1 addition & 0 deletions public/app/features/explore/state/reducers.ts
Expand Up @@ -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,
Expand Down

0 comments on commit 221042c

Please sign in to comment.