React final form change function doesn't work correctly

1.3k views Asked by At

I'm trying to play around with React-Final-Form library, Here is my sandbox link : https://codesandbox.io/s/nice-vaughan-czk7g9?file=/src/index.js

When I click on 'Change' button, I want the country field (coming from the initialValues) to be get set or its value should get changed to the new given value. But what's happening is, country's existing value gets picked up and a new object key-value pair with key as "country's existing value" and value as the new value given gets appended.

Could someone helps what's wrong I'm doing here and how could I change the value of the field via change function.

Thanks.

0

There are 0 answers