function prepareDownload () {
            self.disabled = false;

            let csv = CsvService.toCsv(CsvService.flatten(self.content));
            if (csv) {
                let downloadBlob = new Blob([csv], {type: 'text/csv;charset=utf-8;' });
                self.downloadUrl = window.URL.createObjectURL(downloadBlob);
            } else {
                // Disable button if there is no data
                self.disabled = true;
            }
        }
/**
         * Generates the appropriate csv content and blob and sets it on the downloadUrl
         */
Generates the appropriate csv content and blob and sets it on the downloadUrl
Generates the appropriate csv content and blob and sets it on the downloadUrl
function prepareDownload () {
            self.disabled = false;
            let csv = CsvService.toCsv(CsvService.flatten(self.content));
            if (csv) {
                let downloadBlob = new Blob([csv], {type: 'text/csv;charset=utf-8;' });
                self.downloadUrl = window.URL.createObjectURL(downloadBlob);
            } else {
                self.disabled = true;
            }
        }
function prepareDownload ( ) { self . disabled = false ; let csv = CsvService . toCsv ( CsvService . flatten ( self . content ) ) ; if ( csv ) { let downloadBlob = new Blob ( [ csv ] , { type : 'text/csv;charset=utf-8;' } ) ; self . downloadUrl = window . URL . createObjectURL ( downloadBlob ) ; } else { self . disabled = true ; } }
Generates the appropriate csv content and blob and sets it on the downloadUrl
Generates the appropriate csv content and blob and sets it on the downloadUrl
// Disable button if there is no data