Belphemur/vue-json-csv

Provide an option to invoke callback on successful download

Keerthu94 opened this issue · 1 comments

Can you please provide an option to invoke callbacks on success and error of downloading a file?

You can do this

 <download-csv
     :data="exportData"
     :labels="exportLabels"
     :fields="exportFields"
     :name="exportFilename"
     ref="export"
     hidden
            />

then when you data is ready call this.$refs.export.generate() in your onClick() function.

I have it hidden because I have a different button for the export event.