Skip to content

Commit cb356b6

Browse files
committed
fix: nanofix
1 parent d617038 commit cb356b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/containers/Tenant/Query/QueryEditor/QueryEditor.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ function QueryEditor(props: QueryEditorProps) {
9898

9999
const isResultLoaded = Boolean(executeQuery.result);
100100

101-
const [inputValue, setInitInputValue] = React.useState<string>(executeQuery.input);
101+
const [inputValue, setInputValue] = React.useState<string>(executeQuery.input);
102102

103103
const propsChangeUserInput = props.changeUserInput;
104104
const changeInputValue = React.useCallback(
105105
(input: string) => {
106-
setInitInputValue(input);
106+
setInputValue(input);
107107
propsChangeUserInput({input});
108108
},
109109
[propsChangeUserInput],
@@ -113,7 +113,7 @@ function QueryEditor(props: QueryEditorProps) {
113113
if (executeQuery.input !== inputValue) {
114114
const response = window.confirm('Input value will be lost. Continue?');
115115
if (response) {
116-
setInitInputValue(executeQuery.input);
116+
setInputValue(executeQuery.input);
117117
} else {
118118
changeInputValue(inputValue);
119119
}
@@ -358,7 +358,7 @@ function QueryEditor(props: QueryEditorProps) {
358358
<div className={b('monaco')}>
359359
<MonacoEditor
360360
language={YQL_LANGUAGE_ID}
361-
value={executeQuery.input}
361+
value={inputValue}
362362
options={editorOptions}
363363
onChange={changeInputValue}
364364
editorDidMount={editorDidMount}

0 commit comments

Comments
 (0)