Buttons 3.0.0
DataTables CDN files for Buttons 3.0.0. This software was originally released on 15th February, 2024.
Release notes
This is a major update for Buttons which makes full use of the new complex headers and footers support from DataTables 2's APIs to make it possible to export multi-row headers and footers, and those with colspan
and rowspan
attributes as well! This is something we've all wanted for a while and it is now finally here!
There are a number of other tweaks, such as the export buttons being asynchronous to allow a processing indicator to show that something is happening when activated (needed for larger exports), and of course a range of fixes.
Buttons 3+ is not compatible with DataTables 1.x, it requires DataTables 2+ due to the use of the new APIs.
New
- Requires DataTables 2+
- Export buttons are all now asynchronous, meaning they happen in the background of the browser, after the user has click the button and shown a processing indicator. This makes it clearer to the end user that something is happening.
buttons.buttons.async
option to specify async behaviour of a button- Print export includes support for multi-row headers and footers
- Print export includes support for colspan / rowspan in headers and footers
- Copy and CSV now support multi-row headers
- Copy and CSV now support colspan / rowspan by using an empty string as filler.
- Excel export supports multi-row header and footers now
- Excel export supports colspan / rowspan in the header and footer
- Support for multi-row and complex headers and footers in PDF export.
- PDF page size will default to
LETTER
for US and Canadian locales filename
,messageTop
,messageBottom
andtitle
configuration options for export buttons, when given as a function, are now passed the button's configuration object and a DataTables API instance as the two parameters for the function now.
Updates
orthogonal
data for export is now an empty string - this tells DataTables to use the underlying data for example, not the formatted data, which might contain locale specific formatting.- Documentation removes mention of the fact that IE8/9 are not supported. This is now a core part of the DataTables support - no IE, so it doesn't need to be explicitly noted.
- Footers are included in the Excel export by default
- Footer is now included in the PDF export by default
- Action function now receives a fifth parameter, a callback that must be executed when the action is complete if the
async
parameter for the button is set.
Fixes
- Set default orthogonal data for export to be
display
- Disable row shading for print
- Dropdown default width of 200px
- Overflow should not result in ellipsis for split arrow button
- Foundation styling for multi-column layout
- FomanticUI with popoverTitle wasn't displaying well
- Bulma popoverTitle wasn't showing correctly
- Bootstrap 5 dropdown would expand forever
- Bootstrap 4 styling for long button text and titles
- Bootstrap 3 and popoverTitle weren't working together
- Overflow styling for long buttons wasn't right in Bootstrap, Bulma, Foundation
- jQuery UI dropdown would loose its dropdown arrow on text update due to no wrapping element
- When columns were reordered, the name of a button wasn't being retained if it was specified as a string.
- Column visibility restore (
colvisRestore
) was breaking when columns were reordered. They would restore to the state when the columns were reordered, rather than their original state. format.body
function was being passed loop counters rather than the row and column indexes as it should have been (per the docs).spacer
button was incorrectly positioned in Bootstrap 3- Left align $ for currency column in exported Excel file
- Add typescript defs for
jszip
andpdfMake
static methods
Types
- Fix integration with DataTables
ext
object new Buttons
constructor returns an instance of Buttons- Button methods have their own trigger method
Docs
- Update for Buttons as a "feature" in DataTables 2
- Consistent formatting for example snippets
Examples
- New example - Explain and show how CSS can be applied specifically for print view only
- Updated for DataTables 2. Focus is on the
layout
option, rather than the legacydom
option - All examples now have a Vanilla JS variant
- All examples formatted using prettier-more for consistent styling of the code.
Files
- //cdn.datatables.net/buttons/3.0.0/js/buttons.bootstrap.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.bootstrap.min.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.bootstrap.min.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.bootstrap.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.bootstrap4.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.bootstrap4.min.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.bootstrap4.min.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.bootstrap4.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.bootstrap5.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.bootstrap5.min.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.bootstrap5.min.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.bootstrap5.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.bulma.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.bulma.min.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.bulma.min.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.bulma.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.colVis.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.colVis.min.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.colVis.min.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.colVis.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.dataTables.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.dataTables.min.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.dataTables.min.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.dataTables.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.foundation.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.foundation.min.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.foundation.min.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.foundation.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.html5.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.html5.min.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.html5.min.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.html5.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.jqueryui.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.jqueryui.min.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.jqueryui.min.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.jqueryui.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.print.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.print.min.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.print.min.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.print.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.semanticui.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.semanticui.min.js
- //cdn.datatables.net/buttons/3.0.0/js/buttons.semanticui.min.mjs
- //cdn.datatables.net/buttons/3.0.0/js/buttons.semanticui.mjs
- //cdn.datatables.net/buttons/3.0.0/js/dataTables.buttons.js
- //cdn.datatables.net/buttons/3.0.0/js/dataTables.buttons.min.js
- //cdn.datatables.net/buttons/3.0.0/js/dataTables.buttons.min.mjs
- //cdn.datatables.net/buttons/3.0.0/js/dataTables.buttons.mjs
- //cdn.datatables.net/buttons/3.0.0/importmap.json
- //cdn.datatables.net/buttons/3.0.0/css/buttons.bootstrap.css
- //cdn.datatables.net/buttons/3.0.0/css/buttons.bootstrap.min.css
- //cdn.datatables.net/buttons/3.0.0/css/buttons.bootstrap4.css
- //cdn.datatables.net/buttons/3.0.0/css/buttons.bootstrap4.min.css
- //cdn.datatables.net/buttons/3.0.0/css/buttons.bootstrap5.css
- //cdn.datatables.net/buttons/3.0.0/css/buttons.bootstrap5.min.css
- //cdn.datatables.net/buttons/3.0.0/css/buttons.bulma.css
- //cdn.datatables.net/buttons/3.0.0/css/buttons.bulma.min.css
- //cdn.datatables.net/buttons/3.0.0/css/buttons.dataTables.css
- //cdn.datatables.net/buttons/3.0.0/css/buttons.dataTables.min.css
- //cdn.datatables.net/buttons/3.0.0/css/buttons.foundation.css
- //cdn.datatables.net/buttons/3.0.0/css/buttons.foundation.min.css
- //cdn.datatables.net/buttons/3.0.0/css/buttons.jqueryui.css
- //cdn.datatables.net/buttons/3.0.0/css/buttons.jqueryui.min.css
- //cdn.datatables.net/buttons/3.0.0/css/buttons.semanticui.css
- //cdn.datatables.net/buttons/3.0.0/css/buttons.semanticui.min.css
- //cdn.datatables.net/buttons/3.0.0/css/common.scss
- //cdn.datatables.net/buttons/3.0.0/css/mixins.scss