From e609b55a48c77ee8fd5cf01e6a1caf2cefbd09e5 Mon Sep 17 00:00:00 2001 From: Sekhar Paladugu Date: Tue, 14 Jun 2016 03:25:06 -0600 Subject: [PATCH] add missing config props for redux form (#9635) --- redux-form/redux-form.d.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/redux-form/redux-form.d.ts b/redux-form/redux-form.d.ts index 1e631ceac4..dfc2df43a9 100644 --- a/redux-form/redux-form.d.ts +++ b/redux-form/redux-form.d.ts @@ -309,6 +309,18 @@ declare module 'redux-form' { */ form: string; + /** + * By default, async blur validation is only triggered if synchronous + * validation passes, and the form is dirty or was never initialized (or if + * submitting). Sometimes it may be desirable to trigger asynchronous + * validation even in these cases, for example if all validation is performed + * asynchronously and you want to display validation messages if a user does + * not change a field, but does touch and blur it. Setting + * alwaysAsyncValidate to true will always run asynchronous validation on + * blur, even if the form is pristine or sync validation fails. + */ + alwaysAsyncValidate?: boolean; + /** * field names for which onBlur should trigger a call to the asyncValidate * function. Defaults to []. @@ -365,7 +377,14 @@ declare module 'redux-form' { * you must pass it as a parameter to handleSubmit() inside your form * component. */ - onSubmit?(values:FormData, dispatch?:Dispatch):any; + onSubmit?(values:FormData, dispatch?:Dispatch): any; + + /** + * If true, the form values will be overwritten whenever the initialValues + * prop changes. If false, the values will not be overwritten if the form has + * previously been initialized. Defaults to true. + */ + overwriteOnInitialValuesChange?: boolean; /** * If specified, all the props normally passed into your decorated