small fix for new variable editor types (#55195)

pull/55260/head
Brendan O'Handley 3 years ago committed by GitHub
parent 5561f935e6
commit 331f3e2a58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      public/app/plugins/datasource/graphite/components/GraphiteVariableEditor.tsx

@ -30,14 +30,21 @@ export const GraphiteVariableEditor = (props: Props) => {
width={25}
value={value.queryType ?? GraphiteQueryType.Default}
onChange={(selectableValue) => {
onChange({
setValue({
...value,
queryType: selectableValue.value,
});
if (value.target) {
onChange({
...value,
queryType: selectableValue.value,
});
}
}}
/>
</InlineField>
<InlineField label="Select query type" labelWidth={20} grow>
<InlineField label="Query" labelWidth={20} grow>
<Input
aria-label="Variable editor query input"
value={value.target}

Loading…
Cancel
Save