Info about button.download.js plugin

Info about button.download.js plugin

tablulartablestablulartables Posts: 1Questions: 1Answers: 0

Hi all,

I was looking for more information about the following plugin for the Buttons extension: https://github.com/DataTables/Plugins/blob/master/buttons/button.download.js

As my database has grown larger and larger, I am now experiencing OOM errors in the Editor libraries when exporting a CSV of my (large) server-side library. I found this plugin referenced on another forum post which sounded promising. Can someone link to the relevant documentation?

At the moment, I'm using the same endpoint I used for all my table operations for this plugin, but it doesn't export anything. I can see the call out to the endpoint via console, but nothing follows. I'm assuming it's expecting something different.

Thanks!

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,280Questions: 1Answers: 10,425 Site admin
    Answer ✓

    The documentation for that plug-in is purely what you see in the file. Sorry!

    Basically what you need to do is include that file on your page and then setup a custom button Button with extend: 'download' to inherit from the plug-in (the example in the comment for the file shows that).

    Then set the url property for the button's configuration object (again shown in the comment) for where you want it to make the request to get the file to download.

    Allan

  • allanallan Posts: 63,280Questions: 1Answers: 10,425 Site admin

    I should have said - if that isn't working for you, please link to a test case showing the issue.

    Allan

Sign In or Register to comment.