ElemeFE / element-react

Element UI
https://elemefe.github.io/element-react/index
MIT License
2.83k stars 444 forks source link

Fix typescript type error using Form component and onSubmit prop #1036

Closed flaforgue closed 2 years ago

flaforgue commented 4 years ago

As described in https://github.com/ElemeFE/element-react/issues/1037

Using React With Typescript, the following :

<Form onSubmit={handleSubmit}>

Causes a type error :

Property 'onSubmit' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Form> & Readonly<FormProps> & Readonly<{ children?: ReactNode; }>'

I think this might resolve the problem.

Please makes sure these boxes are checked before submitting your PR, thank you!

Changes in this pull request

mamonaabdullah122 commented 2 years ago

I have the same issue.

henryowens commented 1 year ago

Me too