Using the clear button does not trigger image delete event
ThisIsPita opened this issue · comments
As the title says. I assume this is intentional since the event is probably meant to trigger on individual image deletion. Don't know if it'd be worth adding an event for when all the images are cleared, even programmatically. In the meantime I'm just looking for a click on elements with the "custom-file-container__image-clear" class to detect when the clear button is used.
Thanks for your work on this awesome plugin.
Sorry for the extremely late response. This as been added in v4.2.0
with the fileUploadWithPreview:clearButtonClicked
event. That will be released and downloadable later tonight.
window.addEventListener('fileUploadWithPreview:clearButtonClicked', function (e) {
console.log('clearButtonClicked')
console.log(e.detail.uploadId)
})