Skip to content

Added missing dirtySinceLastSubmit to meta #47

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

Merged
merged 1 commit into from
Oct 15, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/FieldArray.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ class FieldArray extends React.Component<Props, State> {
length,
active,
dirty,
dirtySinceLastSubmit,
error,
initial,
invalid,
Expand All @@ -200,10 +201,12 @@ class FieldArray extends React.Component<Props, State> {
valid,
visited,
...fieldStateFunctions
} = this.state.state || {}
} =
this.state.state || {}
const meta = {
active,
dirty,
dirtySinceLastSubmit,
error,
initial,
invalid,
Expand Down
1 change: 1 addition & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface FieldArrayRenderProps {
// TODO: Make a diff of `FieldState` without all the functions
active: boolean
dirty: boolean
dirtySinceLastSubmit: boolean
error: boolean
initial: boolean
invalid: boolean
Expand Down
1 change: 1 addition & 0 deletions src/types.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export type FieldArrayRenderProps = {
// TODO: Make a diff of `FieldState` without all the functions
active: boolean,
dirty: boolean,
dirtySinceLastSubmit: boolean,
error: boolean,
initial: boolean,
invalid: boolean,
Expand Down