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.
This commit is contained in:
Evan Rusackas
2026-04-17 17:24:17 -07:00
committed by Claude
parent 7dd8bc686b
commit de802edf2a

View File

@@ -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<Node, 'contains'> | 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);