mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
Add missing props parameter to onSubmitFail and onSubmitSuccess in redux-form (#16108)
* Add missing props parameter to onSubmitFail and onSubmitSuccess * Update comments
This commit is contained in:
committed by
Sheetal Nandi
parent
75eb807efc
commit
d2f5ddec1e
9
types/redux-form/lib/reduxForm.d.ts
vendored
9
types/redux-form/lib/reduxForm.d.ts
vendored
@@ -119,13 +119,18 @@ export interface Config<FormData extends DataShape, P, S> {
|
||||
* @param dispatch The Redux `dispatch` function.
|
||||
* @param submitError The error object that caused the submission to fail. If `errors` is set this will be most
|
||||
* likely a `SubmissionError`, otherwise it can be any error or null.
|
||||
* @param props The props passed into your decorated component.
|
||||
*/
|
||||
onSubmitFail?(errors: FormErrors<FormData>, dispatch: Dispatch<S>, submitError: any): void;
|
||||
onSubmitFail?(errors: FormErrors<FormData>, dispatch: Dispatch<S>, submitError: any, props: P): void;
|
||||
|
||||
/**
|
||||
* A callback function that will be called when a submission succeeds.
|
||||
*
|
||||
* @param result Any result that onSubmit has returned
|
||||
* @param dispatch The Redux dispatch function
|
||||
* @param props The props passed into your decorated component
|
||||
*/
|
||||
onSubmitSuccess?(result: any, dispatch: Dispatch<S>): void;
|
||||
onSubmitSuccess?(result: any, dispatch: Dispatch<S>, props: P): void;
|
||||
|
||||
/**
|
||||
* If specified, all the props normally passed into your decorated
|
||||
|
||||
Reference in New Issue
Block a user