grafana/public/app/features/explore/QueryRows.tsx
Andreas Opferkuch 221042c293
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.
2020-05-08 17:49:47 +02:00

30 lines
739 B
TypeScript

// Libraries
import React, { PureComponent } from 'react';
// Components
import QueryRow from './QueryRow';
// Types
import { Emitter } from 'app/core/utils/emitter';
import { ExploreId } from 'app/types/explore';
interface QueryRowsProps {
className?: string;
exploreEvents: Emitter;
exploreId: ExploreId;
queryKeys: string[];
}
export default class QueryRows extends PureComponent<QueryRowsProps> {
render() {
const { className = '', exploreEvents, exploreId, queryKeys } = this.props;
return (
<div className={className}>
{queryKeys.map((key, index) => {
return <QueryRow key={key} exploreEvents={exploreEvents} exploreId={exploreId} index={index} />;
})}
</div>
);
}
}