Registry: add a reusable function registry (#17047)

This commit is contained in:
Ryan McKinley
2019-07-16 11:40:23 -07:00
committed by GitHub
parent 5151b8ce07
commit c194ae1ba5
35 changed files with 406 additions and 283 deletions
+3 -2
View File
@@ -6,7 +6,8 @@ import _ from 'lodash';
import { getBackendSrv } from '@grafana/runtime';
// Components
import { FormLabel, Select, SelectOptionItem } from '@grafana/ui';
import { FormLabel, Select } from '@grafana/ui';
import { SelectableValue } from '@grafana/data';
// Types
import { QueryEditorProps } from '@grafana/ui';
@@ -40,7 +41,7 @@ export class QueryEditor extends PureComponent<Props> {
this.setState({ scenarioList: scenarioList, current: current });
}
onScenarioChange = (item: SelectOptionItem<string>) => {
onScenarioChange = (item: SelectableValue<string>) => {
this.props.onChange({
...this.props.query,
scenarioId: item.value,