From 22537bec2e6ca75fd9ac4eb6408ace289bdb414d Mon Sep 17 00:00:00 2001 From: Isabella Siu Date: Thu, 23 Feb 2023 11:50:48 -0500 Subject: [PATCH] CloudWatch Logs: Fix query editor freezing (#63661) --- .../datasource/cloudwatch/components/LogsQueryField.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/app/plugins/datasource/cloudwatch/components/LogsQueryField.tsx b/public/app/plugins/datasource/cloudwatch/components/LogsQueryField.tsx index 077a5ca6b8a..e9845f53076 100644 --- a/public/app/plugins/datasource/cloudwatch/components/LogsQueryField.tsx +++ b/public/app/plugins/datasource/cloudwatch/components/LogsQueryField.tsx @@ -102,6 +102,9 @@ export const CloudWatchLogsQueryField = (props: CloudWatchLogsQueryFieldProps) = cleanText={cleanText} placeholder="Enter a CloudWatch Logs Insights query (run with Shift+Enter)" portalOrigin="cloudwatch" + // By default QueryField calls onChange if onBlur is not defined, this will trigger a rerender + // And slate will claim the focus, making it impossible to leave the field. + onBlur={() => {}} /> {ExtraFieldElement}