Skip to content

Commit 1785b25

Browse files
authored
Fixed flow FieldArrayProps problem (final-form#53)
1 parent dd6dd41 commit 1785b25

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/FieldArray.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import { version as rffVersion } from 'react-final-form'
1010
import diffSubscription from './diffSubscription'
1111
import type { FieldSubscription, FieldState, FieldValidator } from 'final-form'
1212
import type { Mutators } from 'final-form-arrays'
13-
import type { FieldArrayProps as Props } from './types'
13+
import type { FieldArrayPropsWithForm as Props } from './types'
1414
import renderComponent from './renderComponent'
1515
import { withReactFinalForm } from 'react-final-form'
16-
export const version = '1.0.6'
16+
export const version = '2.0.1'
1717

1818
const versions = {
1919
'final-form': ffVersion,

src/types.js.flow

+5-2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ export type FieldArrayProps = {
4444
name: string,
4545
subscription?: FieldSubscription,
4646
isEqual?: (any, any) => boolean,
47-
validate?: (value: ?(any[]), allValues: Object) => ?any,
48-
reactFinalForm: FormApi
47+
validate?: (value: ?(any[]), allValues: Object) => ?any
4948
} & RenderableProps<FieldArrayRenderProps>
49+
50+
export type FieldArrayPropsWithForm = {
51+
reactFinalForm: FormApi
52+
} & FieldArrayProps

0 commit comments

Comments
 (0)