Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed flow FormSpy problem #377

Merged
merged 1 commit into from Nov 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/FormSpy.js
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react'
import { formSubscriptionItems } from 'final-form'
import diffSubscription from './diffSubscription'
import renderComponent from './renderComponent'
import type { FormSpyProps as Props, FormSpyRenderProps } from './types'
import type { FormSpyPropsWithForm as Props, FormSpyRenderProps } from './types'
import type { FormState } from 'final-form'
import isSyntheticEvent from './isSyntheticEvent'
import { all } from './ReactFinalForm'
Expand Down
5 changes: 4 additions & 1 deletion src/types.js.flow
Expand Up @@ -98,7 +98,10 @@ export type FieldPropsWithForm = {
} & FieldProps

export type FormSpyProps = {
reactFinalForm: FormApi,
onChange?: (formState: FormState) => void,
subscription?: FormSubscription
} & RenderableProps<FormSpyRenderProps>

export type FormSpyPropsWithForm = {
reactFinalForm: FormApi
} & FormSpyProps