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

Removal of element doesn't really remove element #1028

Closed
idmeneo opened this issue Jan 28, 2020 · 6 comments · Fixed by #1029
Closed

Removal of element doesn't really remove element #1028

idmeneo opened this issue Jan 28, 2020 · 6 comments · Fixed by #1029
Labels

Comments

@idmeneo
Copy link

idmeneo commented Jan 28, 2020

Description:

Hi,
When you click on the delete button on an element, it disapears from the DOM (the field is put on "display:none") but is'nt actually removed from the form.
And when you save the data, the field is still in the form. It can easally seen on the demo site under the getData() method.

Environment Details:

  • formBuilder Version: LAST
  • Browser: Chrome
  • OS: Windows

Expected Behavior

Field is supposed to be removed from the form

Actual Behavior

Field is just hidden and not removed

Steps to Reproduce

Click a delete button on a field and save data : the field is still here.

screenshot

formbuilder

@idmeneo
Copy link
Author

idmeneo commented Jan 28, 2020

Ok found a way to make it work : if you add "fieldRemoveWarn: true, " to the options, the field is actually deleted.

@idmeneo idmeneo closed this as completed Jan 28, 2020
@W1-PopelierE
Copy link

Are you sure this isn't still a bug?
Seems like a bug to me. If you remove a component, it should not be in the form data.

@idmeneo
Copy link
Author

idmeneo commented Jan 28, 2020

Are you sure this isn't still a bug?
Seems like a bug to me. If you remove a component, it should not be in the form data.

Yes it is of course. I'll reopen it.

@idmeneo idmeneo reopened this Jan 28, 2020
@W1-PopelierE
Copy link

@kevinchappell Looks like a critical bug in the latest release.

@kevinchappell
Copy link
Owner

Thanks for opening and re-opening this issue. A new version should be released in a few minutes

kevinchappell pushed a commit that referenced this issue Jan 28, 2020
## [3.3.1](v3.3.0...v3.3.1) (2020-01-28)

### Bug Fixes

* field removed from stage but not formData ([2c6d824](2c6d824)), closes [#1028](#1028)
@kevinchappell
Copy link
Owner

🎉 This issue has been resolved in version 3.3.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants