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

formatOnBlur is also updating the value in the form state

Open
#383 4 comments 10 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.4k
Forks
497
PR merge metrics
No merged PRs in 30d

Description

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

### What is the current behavior?
When formatOnBlur is used the value of that field is also updated in the form state in the format which is passed to field.

### What is the expected behavior?

It should just format the value to display in the field, should not update on form state

### What's your environment?

react-final-form: 3.6.5
Chrome browser
node: v10.5.0

### Other information

https://codesandbox.io/s/zwk325kl
type any number in the price field and see the form values on blur of the field

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.