Skip to content

Commit

Permalink
fix(react): add onPointerDown, onTouchEnd, add onTouchMove (#29736)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stev24 and steven authored Aug 2, 2024
1 parent 133995a commit bfee3cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/react/src/components/navigation/IonTabButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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__*/ (() =>
Expand Down

0 comments on commit bfee3cd

Please sign in to comment.