react-final-form icon indicating copy to clipboard operation
react-final-form copied to clipboard

formatOnBlur is also updating the value in the form state

Open bhavathi opened this issue 7 years ago • 4 comments

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

bhavathi avatar Nov 23 '18 10:11 bhavathi

I have the same issue. In my case, the validation will fail because it updates the value in the form state

changLiuUNSW avatar Dec 08 '18 13:12 changLiuUNSW

I came across this problem too. Any updates/workarounds?

Filson14 avatar May 31 '19 07:05 Filson14

Bump, this bug is really unexpected, and impossible to work around.

fzaninotto avatar Sep 13 '21 15:09 fzaninotto

any updates on this? This is a really annoying bug :disappointed:

nkappler avatar Apr 14 '22 20:04 nkappler