-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<OnChange> without name attribute broken after react-final-form update #23
Comments
You can use FormSpy from RFF instead of onChange from this library to subscribe to changes of any Field value in Form. |
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
<OnChange>
component withoutname
attribute specified, it used to pass a whole values object to thechildren
callback as an argument. But with a recent update ofreact-final-form
from 6.4.0 to 6.5.0, the error started appearing:What is the expected behavior?
The callback passed a whole object of values if no field name specified to listen to in
<OnChange>
component. See the screenshot with desired behavior below.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.
The text was updated successfully, but these errors were encountered: