mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
parent
583b6fe1e7
commit
7007c6a760
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
import React, { FC, useCallback, useEffect, useRef, useState } from "preact/compat";
|
||||
import React, { FC, useEffect, useRef, useState } from "preact/compat";
|
||||
import { KeyboardEvent } from "react";
|
||||
import { ErrorTypes } from "../../../types";
|
||||
import TextField from "../../Main/TextField/TextField";
|
||||
|
@ -62,7 +62,7 @@ const QueryEditor: FC<QueryEditorProps> = ({
|
|||
onChange(val);
|
||||
};
|
||||
|
||||
const handleKeyDown = useCallback((e: KeyboardEvent) => {
|
||||
const handleKeyDown = (e: KeyboardEvent) => {
|
||||
const { key, ctrlKey, metaKey, shiftKey } = e;
|
||||
|
||||
const value = (e.target as HTMLTextAreaElement).value || "";
|
||||
|
@ -94,7 +94,7 @@ const QueryEditor: FC<QueryEditorProps> = ({
|
|||
e.preventDefault();
|
||||
onEnter();
|
||||
}
|
||||
}, [openAutocomplete]);
|
||||
};
|
||||
|
||||
const handleChangeFoundOptions = (val: AutocompleteOptions[]) => {
|
||||
setOpenAutocomplete(!!val.length);
|
||||
|
|
Loading…
Reference in a new issue