From 1cf1eca00239f3e98854466116e42f9a2e7b4590 Mon Sep 17 00:00:00 2001 From: Fabio Costa <6663243+fab1o@users.noreply.github.com> Date: Wed, 9 Aug 2023 10:05:39 -0400 Subject: [PATCH] fix(tab-button): update event type interface on React (#27950) closes #27949 --------- ## What is the current behavior? - Typescript is complaining about the `onClick` event type of the `IonTabButton` ```ts const App: React.FC = () => { async function handleTabClick(e: CustomEvent) { alert(e.detail.tab); } return ( ); }; ``` ## What is the new behavior? - `onClick` handler uses `CustomEvent` type - Typescript does not error ## Does this introduce a breaking change? - [ ] Yes - [x] No ## Other information --- packages/react/src/components/navigation/IonTabButton.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/components/navigation/IonTabButton.tsx b/packages/react/src/components/navigation/IonTabButton.tsx index 80405d1a15..915761660e 100644 --- a/packages/react/src/components/navigation/IonTabButton.tsx +++ b/packages/react/src/components/navigation/IonTabButton.tsx @@ -9,7 +9,7 @@ type Props = LocalJSX.IonTabButton & IonicReactProps & { routerOptions?: RouterOptions; ref?: React.Ref; - onClick?: (e: Event) => void; + onClick?: (e: CustomEvent) => void; }; export const IonTabButton = /*@__PURE__*/ (() =>