Skip to content

Commit 49759bd

Browse files
authored
Fixed flow FormSpy problem (#377)
1 parent 61c2ce6 commit 49759bd

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/FormSpy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as React from 'react'
33
import { formSubscriptionItems } from 'final-form'
44
import diffSubscription from './diffSubscription'
55
import renderComponent from './renderComponent'
6-
import type { FormSpyProps as Props, FormSpyRenderProps } from './types'
6+
import type { FormSpyPropsWithForm as Props, FormSpyRenderProps } from './types'
77
import type { FormState } from 'final-form'
88
import isSyntheticEvent from './isSyntheticEvent'
99
import { all } from './ReactFinalForm'

src/types.js.flow

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ export type FieldPropsWithForm = {
9898
} & FieldProps
9999

100100
export type FormSpyProps = {
101-
reactFinalForm: FormApi,
102101
onChange?: (formState: FormState) => void,
103102
subscription?: FormSubscription
104103
} & RenderableProps<FormSpyRenderProps>
104+
105+
export type FormSpyPropsWithForm = {
106+
reactFinalForm: FormApi
107+
} & FormSpyProps

0 commit comments

Comments
 (0)