mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 16:45:43 -06:00
221042c293
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.
30 lines
739 B
TypeScript
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>
|
|
);
|
|
}
|
|
}
|