From 9e0c0e74fbe721ee379aedf8cddcb17c5f266872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20B=C3=ADro=C5=A1?= Date: Sat, 28 Oct 2017 11:38:09 +0200 Subject: [PATCH] Actualized FieldArrayMetaProps and FieldProps according to flow types from redux-form v7.1.2 --- types/redux-form/v6/lib/FieldArray.d.ts | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/types/redux-form/v6/lib/FieldArray.d.ts b/types/redux-form/v6/lib/FieldArray.d.ts index 9629eecb27..42308c4f76 100644 --- a/types/redux-form/v6/lib/FieldArray.d.ts +++ b/types/redux-form/v6/lib/FieldArray.d.ts @@ -103,6 +103,10 @@ interface WrappedFieldArrayProps { } interface FieldsProps { + /** + * true if field is field array + */ + _isFieldArray: boolean /** * A method to iterate over each value of the array. */ @@ -134,6 +138,15 @@ interface FieldsProps { */ map(callback: (name: string, index: number, fields: FieldsProps) => any): any; + /** + * A method to move value in array on on different index in the field array + */ + move(from: number, to: number): void; + + /** + * Name of field array + */ + name: string; /** * Removes an item from the end of the array. Returns the item removed. */ @@ -144,16 +157,32 @@ interface FieldsProps { */ push(value: T): void; + /** + * TODO: Need to figure out what does this do, its taken + * directly form redux-form repo and flow types + */ + reduce(callback: Function): any + /** * Removes an item from the array at an arbitrary index. */ remove(index: number): void; + /** + * It will remove all fields in field array + */ + removeAll(): void + /** * Removes an item from beginning of the array. Returns the item removed. */ shift(): T; + /** + * TODO: Need to figure out what does this do, its taken + * directly form redux-form repo and flow types + */ + some(callback: Function): void /** * Swaps two items in the array at the given indexes. */ @@ -197,6 +226,15 @@ interface FieldArrayMetaProps { */ pristine: boolean; + /** + * true if field array is being submitted + */ + submitting: boolean; + + /** + * true if some field value in the field array fails validation on submit + */ + submitFailed: boolean; /** * true if any of the fields have been touched. */