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

Add support for the props that the native <form /> takes #1165

Closed
ErnestTeluk opened this issue Sep 16, 2022 · 1 comment
Closed

Add support for the props that the native <form /> takes #1165

ErnestTeluk opened this issue Sep 16, 2022 · 1 comment
Assignees
Labels
Area: Core Affects the uniforms package Type: Bug Bug reports and their fixes

Comments

@ErnestTeluk
Copy link
Contributor

ErnestTeluk commented Sep 16, 2022

Currently, <BaseForm /> does not support the types that the native form can accept e.g. name. If we add name prop to <ValidateForm /> we get this error:

TS2769: No overload matches this call.   Overload 1 of 2, '(props: ValidatedFormProps<unknown>): Validated<typeof BaseForm>.ValidatedForm<unknown, ValidatedFormProps<unknown>, ValidatedFormState<unknown>>', gave the following error.     Type '{ children: Element; schema: SimpleSchema2Bridge; model: { a: number; }; onValidate: Mock<any, [model: any, error: any]>; validator: Mock<any, any>; name: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Validated<typeof BaseForm>.ValidatedForm<unknown, ValidatedFormProps<unknown>, ValidatedFormState<unknown>>> & Pick<...> & Partial<...> & Partial<...>'.       Property 'name' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Validated<typeof BaseForm>.ValidatedForm<unknown, ValidatedFormProps<unknown>, ValidatedFormState<unknown>>> & Pick<...> & Partial<...> & Partial<...>'.   Overload 2 of 2, '(props: BaseFormProps<unknown>): BaseForm<unknown, BaseFormProps<unknown>, BaseFormState<unknown>>', gave the following error.     Type '{ children: Element; schema: SimpleSchema2Bridge; model: { a: number; }; onValidate: Mock<any, [model: any, error: any]>; validator: Mock<any, any>; name: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<BaseForm<unknown, BaseFormProps<unknown>, BaseFormState<unknown>>> & Pick<...> & Partial<...> & Partial<...>'.       Property 'validator' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<BaseForm<unknown, BaseFormProps<unknown>, BaseFormState<unknown>>> & Pick<...> & Partial<...> & Partial<...>'. Did you mean 'validate'?
@ErnestTeluk ErnestTeluk changed the title add support for the prop that the native <form /> takes add support for the props that the native <form /> takes Sep 16, 2022
@ErnestTeluk ErnestTeluk added Type: Bug Bug reports and their fixes Area: Core Affects the uniforms package labels Sep 16, 2022
@ErnestTeluk ErnestTeluk changed the title add support for the props that the native <form /> takes Add support for the props that the native <form /> takes Sep 16, 2022
@radekmie radekmie self-assigned this Oct 7, 2022
@radekmie
Copy link
Contributor

radekmie commented Oct 7, 2022

As discussed, this should be a part of the requirements for #1160 instead.

@radekmie radekmie closed this as completed Oct 7, 2022
@radekmie radekmie moved this to Closed in Open Source Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Core Affects the uniforms package Type: Bug Bug reports and their fixes
Projects
Archived in project
Development

No branches or pull requests

2 participants