Can't use colvis from datatables-buttons npm package

Can't use colvis from datatables-buttons npm package

rowdmaprowdmap Posts: 1Questions: 1Answers: 0

After installing datatables-buttons from npm, it seems to load properly, but throws this error when trying to use the colvis button: Cannot extend unknown button type: colvis

I've tried looking around for other npm packages like datatables-buttons-colvis, but I haven't been able to find any. Is there a way to use the column visibility plugin with the buttons npm package?


  • allanallan Posts: 56,444Questions: 1Answers: 8,957 Site admin


    The package includes the scripts for column visibility control, HTML5 export, Flash export and Print view, but they are not included by default. Instead what you need to do is add them to your require statements - for example you might do:


    The last line simply does an include of that specific file from the package.

    The files for the buttons are:

    • js/buttons.colVis.js
    • js/buttons.flash.js
    • js/buttons.html5.js
    • js/buttons.print.js


This discussion has been closed.