Vue-formulate: File doesn't remove from submit data

Created on 6 Sep 2020  路  8Comments  路  Source: wearebraid/vue-formulate

Describe the bug
File doesn't remove from data in the submitHandler(data) after click on remove icon.

To Reproduce
Steps to reproduce the behavior:

  1. Go to this codepen and open debug view (In edit mode, the file field does not work for me)
  2. Add the file to the avatar field
  3. Click on Save profile. Now the uploaded file can be seen in the data object
  4. Click on remove icon. File removed from field, but:
  5. Click on Save profile. The file is still present in the data object

Reproduction
CodePen: https://codepen.io/maksabuzyarov/pen/vYGppEa

Expected behavior
I think that the file description should not be present in the data object after deleting it

Screenshots

  1. File added, clicked on Save profile.
    image
  1. File removed. clicked on Save profile.
    image

Device information:

  • Device: notebook MSI
  • OS: Windows 10
  • Browser: Google Chrome 85.0.4183.83
bug ready for release

All 8 comments

I checked the branch 2.4.4.

It works, thanks!

Yep! Fixed in release/2.4.4 (not quite published yet)

@justin-schroeder
In version 2.4.5 It does not work again :(

Reproduction (copied)
CodePen: https://codepen.io/maksabuzyarov/pen/vYGppEa

Damn, a regression eh? Thats why having tests on these things would be really nice....ok I'll reopen this. in the meantime lock 2.4.4 in

@acemir I think this has to do with the updates in 2.4.5 in your PR. I imagine its an easy fix, any chance you want to tackle it?

@acemir I think this has to do with the updates in 2.4.5 in your PR. I imagine its an easy fix, any chance you want to tackle it?

@justin-schroeder Of course. I'll take a look at this scenario in a moment!

@acemir I think this has to do with the updates in 2.4.5 in your PR. I imagine its an easy fix, any chance you want to tackle it?

@justin-schroeder Of course. I'll take a look at this scenario in a moment!

Did some digging into this problem myself. Looks like when the file is removed from the grouping you're not emitting the new value of the form file input. I think it would be as simple as that.

Phew, ok good news on this front. This is now fixed in release/2.5.0 (not released as of writing, but usable) and we've gone through the effort of getting cypress tests in place to prevent regressions here again.

Was this page helpful?
0 / 5 - 0 ratings