diff --git a/redisinsight/ui/src/pages/workbench/components/wb-results/WBResults/WBResults.tsx b/redisinsight/ui/src/pages/workbench/components/wb-results/WBResults/WBResults.tsx index 5ca2a48541..314a329aad 100644 --- a/redisinsight/ui/src/pages/workbench/components/wb-results/WBResults/WBResults.tsx +++ b/redisinsight/ui/src/pages/workbench/components/wb-results/WBResults/WBResults.tsx @@ -52,7 +52,11 @@ const WBResults = (props: Props) => { ) - const handleQueryProfile = (profileType: ProfileQueryType) => { + const handleQueryProfile = ( + profileType: ProfileQueryType, + commandExecution: { command: string, mode?: RunQueryMode, resultsMode?: ResultsMode } + ) => { + const { command, mode, resultsMode } = commandExecution const profileQuery = generateProfileQueryForCommand(command, profileType) if (profileQuery) { onQueryProfile( @@ -101,7 +105,10 @@ const WBResults = (props: Props) => { resultsMode={resultsMode} db={db} onQueryOpen={() => onQueryOpen(id)} - onQueryProfile={handleQueryProfile} + onQueryProfile={(profileType) => handleQueryProfile( + profileType, + { command, mode, resultsMode }, + )} onQueryReRun={() => onQueryReRun( command, null,