From 5e125557340ef360a4114c9e62ec7e04faea766a Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Fri, 2 Mar 2018 16:31:12 -0500 Subject: [PATCH 1/2] Add missing label to WrappedFieldProps All of the redux-form examples show `label` being passed to the `component` of a `Field`, and `label` is on `BaseFieldProps` for what's passed to the `Field`. However, `label` is missing from `WrappedFieldProps`, which is what's passed to the thing referenced by `component`. --- types/redux-form/lib/Field.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/redux-form/lib/Field.d.ts b/types/redux-form/lib/Field.d.ts index 7a3c11af3f..a6c2b2e5bb 100644 --- a/types/redux-form/lib/Field.d.ts +++ b/types/redux-form/lib/Field.d.ts @@ -72,6 +72,7 @@ export class Field

extends Comp export interface WrappedFieldProps { input: WrappedFieldInputProps; meta: WrappedFieldMetaProps; + label?: string; } export interface WrappedFieldInputProps extends CommonFieldInputProps { From 61a3511bdeaba47501942d1cf1cc1bbecd00df71 Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Fri, 2 Mar 2018 16:55:30 -0500 Subject: [PATCH 2/2] Update tests --- types/redux-form/redux-form-tests.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/types/redux-form/redux-form-tests.tsx b/types/redux-form/redux-form-tests.tsx index 8949fa6ec2..f4317ade87 100644 --- a/types/redux-form/redux-form-tests.tsx +++ b/types/redux-form/redux-form-tests.tsx @@ -109,6 +109,7 @@ interface MyFieldCustomProps { type MyFieldProps = MyFieldCustomProps & WrappedFieldProps; const MyField: React.StatelessComponent = ({ children, + label, input, meta, foo