From bfee3cd064a9b495489c2679ccfb762e622dbf09 Mon Sep 17 00:00:00 2001 From: Steven Ribeiro Date: Fri, 2 Aug 2024 23:53:13 +0200 Subject: [PATCH] fix(react): add onPointerDown, onTouchEnd, add onTouchMove (#29736) Issue number: resolves #29174 --------- ## What is the current behavior? React throws tab errors with `IonTabButton` when binding to `onPointerDown`, `onTouchEnd` and `onTouchMove` ## What is the new behavior? - Adds missing type definitions for `onPointerDown`, `onTouchEnd` and `onTouchMove` to `IonTaButton` - React does not throw type errors when binding callback functions to these events --------- ## Does this introduce a breaking change? - [ ] Yes - [x] No --------- Co-authored-by: steven --- packages/react/src/components/navigation/IonTabButton.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/react/src/components/navigation/IonTabButton.tsx b/packages/react/src/components/navigation/IonTabButton.tsx index 915761660e..c78af7ec92 100644 --- a/packages/react/src/components/navigation/IonTabButton.tsx +++ b/packages/react/src/components/navigation/IonTabButton.tsx @@ -10,6 +10,9 @@ type Props = LocalJSX.IonTabButton & routerOptions?: RouterOptions; ref?: React.Ref; onClick?: (e: CustomEvent) => void; + onPointerDown?: React.PointerEventHandler; + onTouchEnd?: React.TouchEventHandler; + onTouchMove?: React.TouchEventHandler; }; export const IonTabButton = /*@__PURE__*/ (() =>