Skip to content

Commit 670ebf6

Browse files
authored
Added missing dirtySinceLastSubmit to meta (#47)
1 parent ed07048 commit 670ebf6

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/FieldArray.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ class FieldArray extends React.Component<Props, State> {
189189
length,
190190
active,
191191
dirty,
192+
dirtySinceLastSubmit,
192193
error,
193194
initial,
194195
invalid,
@@ -200,10 +201,12 @@ class FieldArray extends React.Component<Props, State> {
200201
valid,
201202
visited,
202203
...fieldStateFunctions
203-
} = this.state.state || {}
204+
} =
205+
this.state.state || {}
204206
const meta = {
205207
active,
206208
dirty,
209+
dirtySinceLastSubmit,
207210
error,
208211
initial,
209212
invalid,

src/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export interface FieldArrayRenderProps {
2222
// TODO: Make a diff of `FieldState` without all the functions
2323
active: boolean
2424
dirty: boolean
25+
dirtySinceLastSubmit: boolean
2526
error: boolean
2627
initial: boolean
2728
invalid: boolean

src/types.js.flow

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export type FieldArrayRenderProps = {
2020
// TODO: Make a diff of `FieldState` without all the functions
2121
active: boolean,
2222
dirty: boolean,
23+
dirtySinceLastSubmit: boolean,
2324
error: boolean,
2425
initial: boolean,
2526
invalid: boolean,

0 commit comments

Comments
 (0)