React-final-form: `dirtyFieldsSinceLastSubmit` is always undefined.

Created on 10 Dec 2019  路  8Comments  路  Source: final-form/react-final-form

Are you submitting a bug report or a feature request?

Bug report. I think.

What is the current behavior?

dirtyFieldsSinceLastSubmit is always undefined, but dirtySinceLastSubmit returns the expected boolean value.

What is the expected behavior?

dirtyFieldsSinceLastSubmit should be an object full of booleans, with a value of true for each field that has a different value from the one when the form was last submitted.

Sandbox Link

https://final-form.org/docs/react-final-form/examples/submission-errors
I don't have a sandbox set up. If you add dirtyFieldsSinceLastSubmit to the destructured arguments in the render prop function and console.log it within that same function, it will always return undefined, even after a submission.

What's your environment?

RFF 6.3.3
FF 4.18.5
Node 10.15.3

Most helpful comment

@erikras - any plans on the next patch/minor release? This feature is in the documentation but absent from the latest release and is now in master. thanks.

All 8 comments

Trying to get an understanding of this also, here is my forked example where we are just rendering out the rest of the props available... https://codesandbox.io/s/crazy-hermann-vow92?fontsize=14&hidenavigation=1&theme=dark

Screen Shot 2019-12-11 at 7 54 38 AM

@erikras - any ideas, here is the docs... https://final-form.org/docs/final-form/types/FormState#dirtyfieldssincelastsubmit

Looks like it has been added to master, just need a version bump https://github.com/final-form/react-final-form/pull/688/files

Thanks, @ianqueue. @erikras, when can we expect the next release?

@erikras - any plans on the next patch/minor release? This feature is in the documentation but absent from the latest release and is now in master. thanks.

@erikras Do you have any plans for release this fix?

Looks like this was just fixed in 6.3.4

Looks like this was just fixed in 6.3.4

Yes, you are right

Upgrade to RFF 6.3.4 and FF 4.18.7 resolves the issue.

Was this page helpful?
0 / 5 - 0 ratings