From 5011b259c700adcbe9dc55e0946c1d0e2eba4d28 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Tue, 29 Nov 2022 11:13:21 +0000 Subject: [PATCH] Chore: ignore eslint rules in `Dropdown`/`TopNavBarMenu` (#59385) ignore eslint rules in dropdown/topnavbarmenu --- packages/grafana-ui/src/components/Dropdown/Dropdown.tsx | 5 +++++ .../app/core/components/AppChrome/TopBar/TopNavBarMenu.tsx | 3 +++ 2 files changed, 8 insertions(+) diff --git a/packages/grafana-ui/src/components/Dropdown/Dropdown.tsx b/packages/grafana-ui/src/components/Dropdown/Dropdown.tsx index 93f91724e2a..bd96418eb51 100644 --- a/packages/grafana-ui/src/components/Dropdown/Dropdown.tsx +++ b/packages/grafana-ui/src/components/Dropdown/Dropdown.tsx @@ -44,6 +44,11 @@ export const Dropdown = React.memo(({ children, overlay, placement }: Props) => {visible && ( + {/* + this is handling bubbled events from the inner overlay + see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-static-element-interactions.md#case-the-event-handler-is-only-being-used-to-capture-bubbled-events + */} + {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}
e.stopPropagation()} className={styles.header}>
{getNavTitle(node.id) ?? node.text}
{node.subTitle &&
{node.subTitle}
}