pqina / vue-filepond

🔌 A handy FilePond adapter component for Vue
https://pqina.nl/filepond
MIT License
1.92k stars 128 forks source link

instantiating a filepond instance with allow-remove=false sets allow-remove=false for all future instances #199

Closed shasderias closed 3 years ago

shasderias commented 3 years ago

Describe the bug When instantiating multiple filepond instances, once a filepond instance is instantiated with allow-remove=false, future filepond instances will also be instantiated with allow-remove=false.

Logs N/A

To Reproduce/Expected behavior https://codesandbox.io/s/happy-resonance-7cr9v

  1. Open codesandbox link
  2. State 0 FilePond works as expected, remove button is shown, initial files can be removed
  3. Click toggle, State 1 FilePond is instantiated (with allow-remove=false)
  4. State 1 FilePond also works as expected, remove button is not shown, initial files cannot be removed
  5. Click toggle, State 0 FilePond is instantiated

Expected: remove button to be shown for State 0 FilePond Got: remove button not shown

Stacktraces N/A

Information about your project:

Additional context Possibly related to pqina/filepond#613?

rikschennink commented 3 years ago

Thanks for reporting, weird, I suspect it has to do with this line, but not sure, PR would be appreciated. https://github.com/pqina/vue-filepond/blob/master/lib/index.js#L137

rikschennink commented 3 years ago

This fixed in FilePond version 4.27.3

https://github.com/pqina/filepond/issues/712