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

<Field> initialValue - not updating value from state

Open
#880 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

### What is the current behavior?

1. Include **initialValue** prop to component from **state**
2. Changing **state** value
3. Initial value rendered by Field is not changing

### What is the expected behavior?

Initial value rendered by Field should be updated.

### Sandbox Link

https://codesandbox.io/s/react-final-form-initialvalue-update-62din

### What's your environment?

React Final Form version: "react-final-form": "^6.3.0"
Final Form version: "final-form": "^4.18.5"
OS/browser affected: Windows 10/Chrome

### Other information

My current workaround is to use defaultValue on element rendered by but it's dirty because I get React warnings about mixing controlled and uncontrolled components.

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.