Skip to content

Commit e8fc35b

Browse files
fix(tabs): onChange callback type definition
1 parent 7367f9c commit e8fc35b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/core/src/Tabs/Tabs.d.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ import { StandardProps, TabsProps } from "@material-ui/core";
22

33
export type HvTabsClassKey = "root" | "flexContainer" | "indicator" | "scroller";
44

5-
export type HvTabsProps = StandardProps<TabsProps, HvTabsClassKey>;
5+
export interface HvTabsProps extends StandardProps<TabsProps, HvTabsClassKey, "onChange"> {
6+
/**
7+
* Explicit re-declaration to workaround MUI typing issue
8+
* https://github.com/mui-org/material-ui/issues/17454
9+
*/
10+
onChange?: (event: React.SyntheticEvent, value: any) => void;
11+
}
612

713
export default function HvTabs(props: HvTabsProps): JSX.Element | null;

0 commit comments

Comments
 (0)