Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: IonTabButton doesn't have default HTML event attributes typed #29174

Closed
3 tasks done
aeharding opened this issue Mar 18, 2024 · 3 comments · Fixed by #29736 · May be fixed by gramirez-vic/prueba1_alcaldia#1, gramirez-vic/prueba1_alcaldia#3 or l00pinfinity/devvscape-code-humor#71
Labels
package: react @ionic/react package type: bug a confirmed bug report

Comments

@aeharding
Copy link
Contributor

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

IonTabButton is missing regular HTML types (onPointerDown, onTouchEnd, onTouchMove, etc)

Expected Behavior

Should have proper types.

Steps to Reproduce

Try to add onPointerDown to IonTabButton in React. Typescript will complain, but the touch end handler will be properly connected/called.

Code Reproduction URL

https://stackblitz.com/edit/wl7fhb-xaawyq?file=src%2Fmain.tsx

Ionic Info

N/A - stackblitz

Additional Information

No response

@thetaPC
Copy link
Contributor

thetaPC commented Mar 21, 2024

Thank you for submitting the issue!

I was able to replicate it. I verified that onClick doesn't cause any type errors. I would recommend using that as a workaround.

@thetaPC thetaPC added package: react @ionic/react package type: bug a confirmed bug report labels Mar 21, 2024
@ionitron-bot ionitron-bot bot removed the triage label Mar 21, 2024
@thetaPC thetaPC removed their assignment Mar 21, 2024
Stev24 added a commit to Stev24/ionic-framework that referenced this issue Jul 26, 2024
github-merge-queue bot pushed a commit that referenced this issue Aug 2, 2024
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>
@thetaPC
Copy link
Contributor

thetaPC commented Aug 2, 2024

Thanks for the issue! This has been resolved via PR #29736 and will be available in an upcoming release of Ionic.

Copy link

ionitron-bot bot commented Sep 1, 2024

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.