alessiomaffeis / vue-picture-input

Mobile-friendly picture file input component for Vue.js 2-3 with image preview, drag and drop, EXIF orientation, and more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Component doesn't emit 'change' when dropping file.

lucifilote opened this issue · comments

Drag and drop a file doesn't emit 'change'.

From here, it seems that if the components has supportsPreview prop enabled, the component will not emit 'change' event when dropping a file.
if (this.supportsPreview) {
this.loadImage(files[0], prefill || false)
} else {
if (prefill) {
this.$emit('prefill')
} else {
this.$emit('change', this.image)
}
}