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

primitives(Flex): Event handlers for Flex as="form" are not typed properly #2891

Closed
4 tasks done
wlee221 opened this issue Nov 3, 2022 · 1 comment
Closed
4 tasks done
Assignees
Labels
bug Something isn't working React An issue or a feature-request for React platform TypeScript An issue associated with TypeScript

Comments

@wlee221
Copy link
Contributor

wlee221 commented Nov 3, 2022

Before creating a new issue, please confirm:

On which framework/platform are you having an issue?

React

Which UI component?

Other

How is your app built?

CRA (TS)

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge

Please describe your bug.

onSubmit handler isn' typed properly on Flex as="form" element.

Its onSubmit is typed as FormEventHandler<HTMLDivElement>, whereas it should be FormEventHandler<HTMLFormElement>.

What's the expected behaviour?

(see above)

Help us reproduce the bug!

https://codesandbox.io/s/recursing-bird-eewc0q?file=/src/App.tsx

Code Snippet

No response

Additional information and screenshots

No response

@wlee221 wlee221 added React An issue or a feature-request for React platform TypeScript An issue associated with TypeScript bug Something isn't working labels Dec 1, 2022
@zchenwei
Copy link
Contributor

This should be fixed in 5.x release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working React An issue or a feature-request for React platform TypeScript An issue associated with TypeScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants