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 <sribeiro@gio.lu>
This commit is contained in:
Steven Ribeiro
2024-08-02 23:53:13 +02:00
committed by GitHub
parent 133995af79
commit bfee3cd064

View File

@ -10,6 +10,9 @@ type Props = LocalJSX.IonTabButton &
routerOptions?: RouterOptions;
ref?: React.Ref<HTMLIonTabButtonElement>;
onClick?: (e: CustomEvent) => void;
onPointerDown?: React.PointerEventHandler<HTMLIonTabButtonElement>;
onTouchEnd?: React.TouchEventHandler<HTMLIonTabButtonElement>;
onTouchMove?: React.TouchEventHandler<HTMLIonTabButtonElement>;
};
export const IonTabButton = /*@__PURE__*/ (() =>