clear query field value before setting value (#142943)

* clear query field value before setting value
This commit is contained in:
Ersin Erdal 2022-10-11 14:53:58 +02:00 committed by GitHub
parent 24b7807d79
commit e552f3be5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 20 deletions

View file

@ -192,6 +192,7 @@ export const EsQueryExpression: React.FC<
<EuiSpacer size="s" />
<EuiFormRow
id="queryEditor"
data-test-subj="queryJsonEditor"
fullWidth
isInvalid={errors.esQuery.length > 0}
error={errors.esQuery}
@ -208,7 +209,6 @@ export const EsQueryExpression: React.FC<
languageId="xjson"
width="100%"
height="200px"
data-test-subj="queryJsonEditor"
value={xJson}
onChange={(xjson: string) => {
setXJson(xjson);