From 0f97925c1ae518c0516607acf12a7e77f561a817 Mon Sep 17 00:00:00 2001 From: Darryl <5493333+darrylsepeda@users.noreply.github.com> Date: Mon, 26 Oct 2020 14:38:39 +0700 Subject: [PATCH] Templating: Custom variable edit UI, change text input into textarea (#28312) (#28322) --- .../variables/custom/CustomVariableEditor.tsx | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/public/app/features/variables/custom/CustomVariableEditor.tsx b/public/app/features/variables/custom/CustomVariableEditor.tsx index 8cb379a7728..7ed80430b3a 100644 --- a/public/app/features/variables/custom/CustomVariableEditor.tsx +++ b/public/app/features/variables/custom/CustomVariableEditor.tsx @@ -4,6 +4,7 @@ import { SelectionOptionsEditor } from '../editor/SelectionOptionsEditor'; import { OnPropChangeArguments, VariableEditorProps } from '../editor/types'; import { connectWithStore } from 'app/core/utils/connectWithReduxStore'; import { MapDispatchToProps, MapStateToProps } from 'react-redux'; +import { Field, TextArea } from '@grafana/ui'; import { StoreState } from 'app/types'; import { changeVariableMultiValue } from '../state/actions'; @@ -18,7 +19,7 @@ interface DispatchProps { export type Props = OwnProps & ConnectedProps & DispatchProps; class CustomVariableEditorUnconnected extends PureComponent { - onChange = (event: ChangeEvent) => { + onChange = (event: ChangeEvent) => { this.props.onPropChange({ propName: 'query', propValue: event.target.value, @@ -29,7 +30,7 @@ class CustomVariableEditorUnconnected extends PureComponent { this.props.onPropChange({ propName, propValue, updateOptions: true }); }; - onBlur = (event: FocusEvent) => { + onBlur = (event: FocusEvent) => { this.props.onPropChange({ propName: 'query', propValue: event.target.value, @@ -43,17 +44,19 @@ class CustomVariableEditorUnconnected extends PureComponent {
Custom Options
- Values separated by comma - + +