@types/redux-form Removed Partial from onSubmit values#24816
@types/redux-form Removed Partial from onSubmit values#24816mhegazy merged 1 commit intoDefinitelyTyped:masterfrom
Conversation
|
Actually I think initialValues can be a Partial because you should be able to initialize a form with partial data but the onSubmit data shouldn't be a partial because if a field is required u check it in the form with validators so u will reach onSubmit with exactly FormData not Partial That's why I've changed only the onSubmit typedefs |
|
@Rockson Thank you for submitting this PR! 🔔 @CarsonF @aikoven @LKay @bancek @alsiola @tehbi4 @huwmartin - please review this PR in the next few days. Be sure to explicitly select If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead. |
|
|
||
| export type FormSubmitHandler<FormData = {}, P = {}> = | ||
| (values: Partial<FormData>, dispatch: Dispatch<any>, props: P) => void | FormErrors<FormData> | Promise<any>; | ||
| (values: FormData, dispatch: Dispatch<any>, props: P) => void | FormErrors<FormData> | Promise<any>; |
There was a problem hiding this comment.
I was rather confused when I looked at this because FormData is an actual DOM API constructor/instance and it makes no sense to have a Partial<FormData>. Naming it TFormData might make it less confusing, but that's not the point of the PR 🤷♀️
|
After 5 days, no one has reviewed the PR 😞. A maintainer will be reviewing the PR in the next few days and will either merge it or request revisions. Thank you for your patience! |
see iss: #24376
Please fill in this template.
npm test.)npm run lint package-name(ortscif notslint.jsonis present).Select one of these and delete the others:
If changing an existing definition:
tslint.jsoncontaining{ "extends": "dtslint/dt.json" }..