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

Fix serializeForm initialization #349

Merged

Conversation

marcoroth
Copy link
Member

Type of PR

Bug fix

Description

@thylacinelol (and probably @acetinick) noted on Discord, that their reflexes using forms stopped working while upgrading to 3.4.0.pre1.

The default option for options['serializeForm'] is undefined. With the value of undefined or true the client should serialize the form. With the value false you opt-out of the form initialization and it should not send any from params to the backend.

Currently you had to opt-in with serializeForm = true to get it working again. It should be the other way around.

This PR fixes this logic.

Why should this be added

The current logic would break backwards compatibility.

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing
  • This is not a documentation update

the default option for `options['serializeForm']` is `undefined`.

With `undefined` or `true` the  client should serialize the form

with `false` you opt-out of the form initialization and it should not send any params to the backend
@marcoroth marcoroth changed the title Fix serialize form initialization Fix serializeForm initialization Nov 3, 2020
@leastbad
Copy link
Contributor

leastbad commented Nov 3, 2020

Ugh, this is almost certainly my doing. Thanks for saving the day, again, @marcoroth

@leastbad leastbad merged commit 215714c into stimulusreflex:master Nov 3, 2020
@marcoroth marcoroth deleted the fix-serializeForm-initialization branch November 3, 2020 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants