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

<OnChange> without name attribute broken after react-final-form update

Open
#23 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
95
Forks
21
PR merge metrics
No merged PRs in 30d

Description

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

**Bug report** (minor update of a peer dependency, react-final-form (6.4.0 -> 6.5.0), causes breaking change).

### What is the current behavior?

When using an `` component without `name` attribute specified, it used to pass a whole values object to the `children` callback as an argument. But with a recent update of `react-final-form` from 6.4.0 to 6.5.0, the error started appearing:

```
prop name cannot be undefined in component
```

### What is the expected behavior?

The callback passed a whole object of values if no field name specified to listen to in `` component. See the screenshot with desired behavior below.

![image](https://user-images.githubusercontent.com/3109399/88104761-92258500-cbab-11ea-886f-14f9d558978d.png)

### Sandbox Link

Sandbox with desired behavior (notice an outdated `react-final-form` version, 6.4.0). Try typing in fields and see the console output.
https://codesandbox.io/s/affectionate-raman-r7qm4?file=/src/App.js&expanddevtools=1

Try changing the version to the latest, and error starts appearing.

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.