From de802edf2abb9a4e25dd2a7b5313ac7983e00096 Mon Sep 17 00:00:00 2001 From: Evan Rusackas Date: Fri, 17 Apr 2026 17:24:17 -0700 Subject: [PATCH] fix(DashboardBuilder): replace any types in shouldFocusTabs signature Tighten the container contains() and event.target types to use EventTarget and Node-based types instead of any, so shouldFocusTabs has a fully typed signature. --- .../src/dashboard/components/DashboardBuilder/utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/utils.ts b/superset-frontend/src/dashboard/components/DashboardBuilder/utils.ts index 6b5836544ed..08d64311d52 100644 --- a/superset-frontend/src/dashboard/components/DashboardBuilder/utils.ts +++ b/superset-frontend/src/dashboard/components/DashboardBuilder/utils.ts @@ -31,10 +31,10 @@ export const getRootLevelTabsComponent = (dashboardLayout: DashboardLayout) => { }; export const shouldFocusTabs = ( - event: { target: { className: string } }, - container: { contains: (arg0: any) => any } | null, + event: { target: EventTarget & { className: string } }, + container: Pick | null, _menuRef: HTMLDivElement | null, ): boolean => // don't focus the tabs when we click on a tab event.target.className === 'ant-tabs-nav-wrap' || - (container?.contains(event.target) ?? false); + (container?.contains(event.target as Node) ?? false);