4👍
Assume you have vue-dropzone with ref in template
<vue-dropzone ref="myVueDropzone" id="dropzone">
</vue-dropzone>
then you should use
this.$refs.myVueDropzone.removeAllFiles()
0👍
The removeAllFiles()
is kind of a hack. It won’t work for some cases.
For example, it will not ‘reset’ the Dropzones’ options
object. So if you want to do validations for diferent cases via the options object, it will not reset with the removeAllFiles()
method.
The right way to reset the Dropzone (or any Vue object in that matter) is to set and change the :key
attribute. Like this for example:
<vue-dropzone :key="`dropzone-${dynamicVariableOrJustSomeCounter}`">
</vue-dropzone>
👤Igor
Source:stackexchange.com