Improve getNativeFormProps in bridges to a more specific type #1212
Labels
Area: Bridge
Affects some of the bridge packages
Bridge: GraphQL
Affects the uniforms-bridge-graphql package
Bridge: JSON Schema
Affects the uniforms-bridge-json-schema package
Bridge: SimpleSchema (v2)
Affects the uniforms-bridge-simple-schema-2 package
Bridge: SimpleSchema
Affects the uniforms-bridge-simple-schema package
Bridge: Zod
Affects the uniforms-bridge-zod package
Type: Feature
New features and feature requests
Milestone
In #1044 the types of
getNativeFormProps
methods in bridges were improved. I believe we can add more exact typings to the returned value here by also specifying thechildren
prop type. Possibly other form props as well? Perhaps we could base the type on the native form prop types provided by React and omit all the necessary properties. Method in question.Example problematic case when creating a custom
Form
component by extending theBaseForm
:which produces the following type error:
The text was updated successfully, but these errors were encountered: