File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
redisinsight/ui/src/components/query/Query Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,11 @@ const Query = (props: Props) => {
95
95
96
96
const onChange = ( value : string = '' ) => {
97
97
setQuery ( value )
98
+
99
+ // clear history position after scrolling all list with empty value
100
+ if ( value === '' && execHistoryPos >= execHistory . length ) {
101
+ execHistoryPos = 0
102
+ }
98
103
}
99
104
100
105
const handleKeyDown = ( e : React . KeyboardEvent ) => {
@@ -127,7 +132,8 @@ const Query = (props: Props) => {
127
132
const { editor } = monacoObjects ?. current
128
133
129
134
const position = editor . getPosition ( )
130
- if ( position ?. lineNumber !== 1 ) return
135
+ // @ts -ignore
136
+ if ( position ?. lineNumber !== 1 || editor . getContribution ( 'editor.contrib.suggestController' ) ?. model ?. state ) return
131
137
132
138
if ( execHistory [ execHistoryPos ] ) {
133
139
const command = execHistory [ execHistoryPos ] . command || ''
You can’t perform that action at this time.
0 commit comments