diff --git a/public/app/plugins/datasource/graphite/components/GraphiteVariableEditor.tsx b/public/app/plugins/datasource/graphite/components/GraphiteVariableEditor.tsx index 96300703a56..1a9c0488830 100644 --- a/public/app/plugins/datasource/graphite/components/GraphiteVariableEditor.tsx +++ b/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, + }); + } }} /> - +