Skip to content
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

6.3.1 breaks autosave example #677

Closed
kristinlindquist opened this issue Nov 18, 2019 · 3 comments · Fixed by #678
Closed

6.3.1 breaks autosave example #677

kristinlindquist opened this issue Nov 18, 2019 · 3 comments · Fixed by #678

Comments

@kristinlindquist
Copy link

Are you submitting a bug report or a feature request?

Bug report

What is the current behavior?

Upon updating to 6.3.1, the AutoSave example no longer works. "values" is always undefined and thus AutoSave never submits form changes.

What is the expected behavior?

That the AutoSave example would work, or be updated to work.

Sandbox Link

https://codesandbox.io/s/react-final-form-auto-save-with-debounce-flqx3

What's your environment?

React-Final-Form: 6.3.1
Final-Form: 4.18.6
React: 16.12.0

@apete343
Copy link

apete343 commented Nov 18, 2019

It looks like a number of the FormState values are absent in 6.3.1 vs 6.3.0.

6.3.0 (final-form@4.18.5)
https://codesandbox.io/s/eloquent-feistel-tghxx?fontsize=14

6.3.1 (final-form@4.18.6)
https://codesandbox.io/s/affectionate-bird-hp4km?fontsize=14

@onlyann
Copy link
Contributor

onlyann commented Nov 19, 2019

I think this is to do with the logic in renderComponent

@erikras shouldn't

if (component) {
return React.createElement(component, {
...rest,
...lazyProps,
children,
render

be

if (component) {
    return React.createElement(
      component,
      Object.assign(lazyProps, rest, {
        children,
        render
      })
    )
  }

@erikras
Copy link
Member

erikras commented Nov 19, 2019

Great reporting, guys! 👍

Fix published in v6.3.2.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants