small fix for new variable editor types (#55195)
This commit is contained in:
@@ -30,14 +30,21 @@ export const GraphiteVariableEditor = (props: Props) => {
|
|||||||
width={25}
|
width={25}
|
||||||
value={value.queryType ?? GraphiteQueryType.Default}
|
value={value.queryType ?? GraphiteQueryType.Default}
|
||||||
onChange={(selectableValue) => {
|
onChange={(selectableValue) => {
|
||||||
onChange({
|
setValue({
|
||||||
...value,
|
...value,
|
||||||
queryType: selectableValue.value,
|
queryType: selectableValue.value,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (value.target) {
|
||||||
|
onChange({
|
||||||
|
...value,
|
||||||
|
queryType: selectableValue.value,
|
||||||
|
});
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</InlineField>
|
</InlineField>
|
||||||
<InlineField label="Select query type" labelWidth={20} grow>
|
<InlineField label="Query" labelWidth={20} grow>
|
||||||
<Input
|
<Input
|
||||||
aria-label="Variable editor query input"
|
aria-label="Variable editor query input"
|
||||||
value={value.target}
|
value={value.target}
|
||||||
|
|||||||
Reference in New Issue
Block a user