Datasource/CloudWatch: Allows a user to search for log groups that aren't there initially (#24695)

Closes #24554
This commit is contained in:
kay delaney
2020-05-14 19:41:38 +01:00
committed by GitHub
parent bc8c05137b
commit 0e8638ec92
3 changed files with 189 additions and 2 deletions
@@ -2,6 +2,9 @@ import { SelectableValue } from '@grafana/data';
import React from 'react';
export type SelectValue<T> = T | SelectableValue<T> | T[] | Array<SelectableValue<T>>;
export type InputActionMeta = {
action: 'set-value' | 'input-change' | 'input-blur' | 'menu-close';
};
export interface SelectCommonProps<T> {
allowCustomValue?: boolean;
@@ -39,7 +42,7 @@ export interface SelectCommonProps<T> {
onCloseMenu?: () => void;
/** allowCustomValue must be enabled. Function decides what to do with that custom value. */
onCreateOption?: (value: string) => void;
onInputChange?: (label: string) => void;
onInputChange?: (value: string, actionMeta: InputActionMeta) => void;
onKeyDown?: (event: React.KeyboardEvent) => void;
onOpenMenu?: () => void;
openMenuOnFocus?: boolean;