Version 6.2 Released!

Click to checkout the new features

Old Documentation
You are browsing documentation for an old version of Tabulator. Consider upgrading your project to Tabulator 6.2

Deprecated Functionality

Download

Download Ready

The downloadReady callback has been replaced with the downloadEncoder callback, which provides more synchronous control of the output file.

Anywhere you used to use the downloadReady option:

var table = new Tabulator("#example-table", {
    downloadReady:function(fileContents, blob){
        //fileContents - the unencoded contents of the file
        //blob - the blob object for the download

        //custom action to send blob to server could be included here

        return blob; //must return a blob to proceed with the download, return false to abort download
    }
});

You should now use the downloadEncoder option, taking care that the new function must actually encode the blob, it can no longer be passed through from the function arguments.

var table = new Tabulator("#example-table", {
    downloadEncoder:function(fileContents, mimeType){
        //fileContents - the unencoded contents of the file
        //mimeType - the suggested mime type for the output

        //custom action to send blob to server could be included here

        return new Blob([fileContents], {type:mimeType}); //must return a blob to proceed with the download, return false to abort download
    }
});
Donate