Skip to content

Commit eebbc0d

Browse files
authored
Merge pull request #339 from RedisInsight/bugfix/RI-2474
#RI-2474 - fix visualizations switching
2 parents e3a68da + 4e999fb commit eebbc0d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

redisinsight/ui/src/components/query-card/QueryCardCliPlugin/QueryCardCliPlugin.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ const QueryCardCliPlugin = (props: Props) => {
6666
pluginIframeRef?.current?.contentWindow?.dispatchEvent(event)
6767
}
6868

69-
const executeCommand = () => {
69+
const executeCommand = (method: string) => {
7070
sendMessageToPlugin({
7171
event: 'executeCommand',
72-
method: currentView.activationMethod,
72+
method,
7373
data: { command: query, data: result }
7474
})
7575
}
@@ -167,7 +167,7 @@ const QueryCardCliPlugin = (props: Props) => {
167167
pluginApi.onEvent(generatedIframeNameRef.current, PluginEvents.loaded, () => {
168168
setIsPluginLoaded(true)
169169
setError('')
170-
executeCommand()
170+
executeCommand(currentView.activationMethod)
171171
})
172172

173173
pluginApi.onEvent(generatedIframeNameRef.current, PluginEvents.error, (error: string) => {
@@ -226,7 +226,7 @@ const QueryCardCliPlugin = (props: Props) => {
226226
setCurrentPlugin(plugin?.name || null)
227227
return
228228
}
229-
executeCommand()
229+
executeCommand(view.activationMethod)
230230
}
231231
}, [result, id])
232232

0 commit comments

Comments
 (0)