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

Issues with some possible values of `initialValues` prop

Open
#370 3 comments 0 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?

The `` reinitialise losing his values when rendered inside a component that use the render props pattern.
The reinitialisation occurs when the initialValues is computed inside the render prop, and **only if any of his keys is an array or an object**

### What is the expected behavior?

It should not lose his state.

### Sandbox Link

https://codesandbox.io/s/1v5lwpr873
In this case the render prop component is the Counter. it is intentionally inserted on top because it could be anything (in my particular case it is a react-apollo Query from which I derive the initialValues).
There are some "failing" values for `initialValues` (`NON_WORKING_INITIAL_VALUES_CASE_1`, `NON_WORKING_INITIAL_VALUES_CASE_2`).

### What's your environment?

react-final-form@3.6.7
final-form@4.10.0
lastest chrome on osx

### Other information

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.