From 699e499cc7d93143a8f005da46d3491c133a3910 Mon Sep 17 00:00:00 2001 From: Ivan Ortega Alba Date: Tue, 11 Jul 2023 12:30:08 +0200 Subject: [PATCH] Variables: Page refreshes hitting enter to select a variable value (#70996) --- .../app/features/dashboard/components/SubMenu/SubMenu.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/app/features/dashboard/components/SubMenu/SubMenu.tsx b/public/app/features/dashboard/components/SubMenu/SubMenu.tsx index 6f0488ec342..fcc57a32a4f 100644 --- a/public/app/features/dashboard/components/SubMenu/SubMenu.tsx +++ b/public/app/features/dashboard/components/SubMenu/SubMenu.tsx @@ -43,6 +43,10 @@ class SubMenuUnConnected extends PureComponent { this.forceUpdate(); }; + disableSubmitOnEnter = (e: React.FormEvent) => { + e.preventDefault(); + }; + render() { const { dashboard, variables, links, annotations, theme } = this.props; @@ -56,7 +60,7 @@ class SubMenuUnConnected extends PureComponent { return (
-
+