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

Pass type parameter to SyntheticEvent #703

Merged
merged 1 commit into from
Jan 10, 2023

Conversation

yukiyokotani
Copy link
Contributor

Describe the issue/change

Currently the type of event that SourceInfo has is SyntheticEvent with no type argument. In the implementation, I believe that it is the input element that fires the event, so SyntheticEvent<HTMLInputElement> should be more appropriate here. This change will improve integration with other libraries such as MUI in terms of TypeScript types.

Add CodeSandbox link to illustrate the issue (If applicable)

Describe specs for failing cases if this is an issue (If applicable)

Describe the changes proposed/implemented in this PR

https://github.com/s-yadav/react-number-format/blob/master/src/types.ts#L23
befor: SyntheticEvent
after: SyntheticEvent<HTMLInputElement>

Link Github issue if this PR solved an existing issue

Example usage (If applicable)

Screenshot (If applicable)

Please check which browsers were used for testing

  • Chrome
  • Chrome (Android)
  • Safari (OSX)
  • Safari (iOS)
  • Firefox
  • Firefox (Android)

@s-yadav
Copy link
Owner

s-yadav commented Jan 9, 2023

Make sense. Thanks for the PR.

@s-yadav s-yadav merged commit 5f27bbe into s-yadav:master Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants