final-form / final-form/react-final-form-hooks

Incorrect pristine value

Open
#37 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
469
Forks
19
PR merge metrics
No merged PRs in 30d

Description

### Are you submitting a **bug report** or a **feature request**?

A bug, pristine value is incorrect when filling a field, then emptying it.

### What is the current behavior?

Initial render => the form is pristine
I fill a field => the form is dirty
I empty the field => the form is still dirty

### What is the expected behavior?

Initial render => the form is pristine
I fill a field => the form is dirty
I empty the field => the form is pristine again

### Sandbox Link

Works as intended in RFF but not in RFFH:

RFF : https://zn82m7zlrp.codesandbox.io/
vs
RFFH : https://71y11y0v1.codesandbox.io/

### What's your environment?

final-form : 4.12.0
react-final-form-hoooks : 1.0.1

### Other information

Thank you for all your awesome work :)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.