Can't use colvis from datatables-buttons npm package
Can't use colvis from datatables-buttons npm package
rowdmap
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?
This discussion has been closed.
Answers
Hi,
The
datatables.net-buttons
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 yourrequire
statements - for example you might do:The last line simply does an include of that specific file from the
datatables.net-buttons
package.The files for the buttons are:
Regards,
Allan