Skip to content

Commit 43ba936

Browse files
committed
#RI-6221 - fix arguments in details
1 parent 78b9df9 commit 43ba936

File tree

1 file changed

+3
-2
lines changed
  • redisinsight/ui/src/pages/workbench/components/query/Query

1 file changed

+3
-2
lines changed

redisinsight/ui/src/pages/workbench/components/query/Query/Query.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ const Query = (props: Props) => {
105105
const { theme } = useContext(ThemeContext)
106106
const monacoObjects = useRef<Nullable<IEditorMount>>(null)
107107

108+
// TODO: need refactor to avoid this
108109
const REDIS_COMMANDS = commands.map((command) => ({ ...addOwnTokenToArgs(command.name!, command) }))
109110

110111
const { instanceId = '' } = useParams<{ instanceId: string }>()
@@ -538,11 +539,11 @@ const Query = (props: Props) => {
538539
if (position.column === 1) {
539540
helpWidgetRef.current.isOpen = false
540541
if (command) return asSuggestionsRef([])
541-
return asSuggestionsRef(getCommandsSuggestions(REDIS_COMMANDS, range), false)
542+
return asSuggestionsRef(getCommandsSuggestions(commands, range), false)
542543
}
543544

544545
if (!command) {
545-
return asSuggestionsRef(getCommandsSuggestions(REDIS_COMMANDS, range), false)
546+
return asSuggestionsRef(getCommandsSuggestions(commands, range), false)
546547
}
547548

548549
const { allArgs, args, cursor } = command

0 commit comments

Comments
 (0)