small fix for new variable editor types (#55195)

This commit is contained in:
Brendan O'Handley 2022-09-15 11:39:40 -05:00 committed by GitHub
parent 5561f935e6
commit 331f3e2a58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,14 +30,21 @@ export const GraphiteVariableEditor = (props: Props) => {
width={25}
value={value.queryType ?? GraphiteQueryType.Default}
onChange={(selectableValue) => {
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}