datatables + parcel: button Excel works, button print/select/selected: uncaught unknown button type
using Parcel and datatables.
Using the Datatables downloader, I have in my app.js
:
require( 'jszip' );
require( 'datatables.net-bs4' )();
require( 'datatables.net-buttons-bs4' )();
require( 'datatables.net-buttons/js/buttons.html5.js' )();
require( 'datatables.net-buttons/js/buttons.print.js' )();
require( 'datatables.net-keytable-bs4' )();
require( 'datatables.net-responsive-bs4' )();
require( 'datatables.net-select-bs4' )();
In my config:
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', // 'selected', 'selectAll', 'print'
],
Issue 1: buttons are not shown
I do see the filter field and table, but the buttons do not show.
Found multiple questions related to this one, but all refer to the need to have B
in dom
.
Issue 2: certain buttons give Uncaught Unknown button type
The Copy/CSV/Excel buttons don't give an error message, but other do: print
, selected
, selectAll
, etc.
These give (e.g.): Uncaught Unknown button type: selectAll
Many similar posts point towards the necessary files not being there.
In my case that seems to be ok:
$ ls -1 node_modules/datatables.net-buttons/js/
buttons.colVis.js
buttons.colVis.min.js
buttons.flash.js
buttons.flash.min.js
buttons.html5.js
buttons.html5.min.js
buttons.print.js
buttons.print.min.js
dataTables.buttons.js
dataTables.buttons.min.js
And from the Parcel log:
19:45 $ parcel build index.html --detailed-report --public-url ./dist --log-level 4 | grep datatable
[7:45:21 PM]: Built node_modules/datatables.net-buttons/js/buttons.print.js...
[7:45:22 PM]: Built node_modules/datatables.net-buttons/js/buttons.html5.js...
[7:45:22 PM]: Built node_modules/datatables.net-select/js/dataTables.select.js...
[7:45:22 PM]: Built node_modules/datatables.net-select-bs4/js/select.bootstrap4.js...
[7:45:22 PM]: Built node_modules/datatables.net-responsive/js/dataTables.responsive.js...
[7:45:22 PM]: Built node_modules/datatables.net-responsive-bs4/js/responsive.bootstrap4.js...
[7:45:22 PM]: Built node_modules/datatables.net-buttons/js/dataTables.buttons.js...
[7:45:22 PM]: Built node_modules/datatables.net-buttons-bs4/js/buttons.bootstrap4.js...
[7:45:22 PM]: Built node_modules/datatables.net/js/jquery.dataTables.js...
[7:45:22 PM]: Built node_modules/datatables.net-bs4/js/dataTables.bootstrap4.js...
[7:45:22 PM]: ├── node_modules/datatables.net/js/jquery.dataTables.js 80.8 KB 423ms
[7:45:22 PM]: ├── node_modules/datatables.net-buttons/js/buttons.html5.js 24.16 KB 111ms
datatables parceljs
add a comment |
using Parcel and datatables.
Using the Datatables downloader, I have in my app.js
:
require( 'jszip' );
require( 'datatables.net-bs4' )();
require( 'datatables.net-buttons-bs4' )();
require( 'datatables.net-buttons/js/buttons.html5.js' )();
require( 'datatables.net-buttons/js/buttons.print.js' )();
require( 'datatables.net-keytable-bs4' )();
require( 'datatables.net-responsive-bs4' )();
require( 'datatables.net-select-bs4' )();
In my config:
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', // 'selected', 'selectAll', 'print'
],
Issue 1: buttons are not shown
I do see the filter field and table, but the buttons do not show.
Found multiple questions related to this one, but all refer to the need to have B
in dom
.
Issue 2: certain buttons give Uncaught Unknown button type
The Copy/CSV/Excel buttons don't give an error message, but other do: print
, selected
, selectAll
, etc.
These give (e.g.): Uncaught Unknown button type: selectAll
Many similar posts point towards the necessary files not being there.
In my case that seems to be ok:
$ ls -1 node_modules/datatables.net-buttons/js/
buttons.colVis.js
buttons.colVis.min.js
buttons.flash.js
buttons.flash.min.js
buttons.html5.js
buttons.html5.min.js
buttons.print.js
buttons.print.min.js
dataTables.buttons.js
dataTables.buttons.min.js
And from the Parcel log:
19:45 $ parcel build index.html --detailed-report --public-url ./dist --log-level 4 | grep datatable
[7:45:21 PM]: Built node_modules/datatables.net-buttons/js/buttons.print.js...
[7:45:22 PM]: Built node_modules/datatables.net-buttons/js/buttons.html5.js...
[7:45:22 PM]: Built node_modules/datatables.net-select/js/dataTables.select.js...
[7:45:22 PM]: Built node_modules/datatables.net-select-bs4/js/select.bootstrap4.js...
[7:45:22 PM]: Built node_modules/datatables.net-responsive/js/dataTables.responsive.js...
[7:45:22 PM]: Built node_modules/datatables.net-responsive-bs4/js/responsive.bootstrap4.js...
[7:45:22 PM]: Built node_modules/datatables.net-buttons/js/dataTables.buttons.js...
[7:45:22 PM]: Built node_modules/datatables.net-buttons-bs4/js/buttons.bootstrap4.js...
[7:45:22 PM]: Built node_modules/datatables.net/js/jquery.dataTables.js...
[7:45:22 PM]: Built node_modules/datatables.net-bs4/js/dataTables.bootstrap4.js...
[7:45:22 PM]: ├── node_modules/datatables.net/js/jquery.dataTables.js 80.8 KB 423ms
[7:45:22 PM]: ├── node_modules/datatables.net-buttons/js/buttons.html5.js 24.16 KB 111ms
datatables parceljs
add a comment |
using Parcel and datatables.
Using the Datatables downloader, I have in my app.js
:
require( 'jszip' );
require( 'datatables.net-bs4' )();
require( 'datatables.net-buttons-bs4' )();
require( 'datatables.net-buttons/js/buttons.html5.js' )();
require( 'datatables.net-buttons/js/buttons.print.js' )();
require( 'datatables.net-keytable-bs4' )();
require( 'datatables.net-responsive-bs4' )();
require( 'datatables.net-select-bs4' )();
In my config:
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', // 'selected', 'selectAll', 'print'
],
Issue 1: buttons are not shown
I do see the filter field and table, but the buttons do not show.
Found multiple questions related to this one, but all refer to the need to have B
in dom
.
Issue 2: certain buttons give Uncaught Unknown button type
The Copy/CSV/Excel buttons don't give an error message, but other do: print
, selected
, selectAll
, etc.
These give (e.g.): Uncaught Unknown button type: selectAll
Many similar posts point towards the necessary files not being there.
In my case that seems to be ok:
$ ls -1 node_modules/datatables.net-buttons/js/
buttons.colVis.js
buttons.colVis.min.js
buttons.flash.js
buttons.flash.min.js
buttons.html5.js
buttons.html5.min.js
buttons.print.js
buttons.print.min.js
dataTables.buttons.js
dataTables.buttons.min.js
And from the Parcel log:
19:45 $ parcel build index.html --detailed-report --public-url ./dist --log-level 4 | grep datatable
[7:45:21 PM]: Built node_modules/datatables.net-buttons/js/buttons.print.js...
[7:45:22 PM]: Built node_modules/datatables.net-buttons/js/buttons.html5.js...
[7:45:22 PM]: Built node_modules/datatables.net-select/js/dataTables.select.js...
[7:45:22 PM]: Built node_modules/datatables.net-select-bs4/js/select.bootstrap4.js...
[7:45:22 PM]: Built node_modules/datatables.net-responsive/js/dataTables.responsive.js...
[7:45:22 PM]: Built node_modules/datatables.net-responsive-bs4/js/responsive.bootstrap4.js...
[7:45:22 PM]: Built node_modules/datatables.net-buttons/js/dataTables.buttons.js...
[7:45:22 PM]: Built node_modules/datatables.net-buttons-bs4/js/buttons.bootstrap4.js...
[7:45:22 PM]: Built node_modules/datatables.net/js/jquery.dataTables.js...
[7:45:22 PM]: Built node_modules/datatables.net-bs4/js/dataTables.bootstrap4.js...
[7:45:22 PM]: ├── node_modules/datatables.net/js/jquery.dataTables.js 80.8 KB 423ms
[7:45:22 PM]: ├── node_modules/datatables.net-buttons/js/buttons.html5.js 24.16 KB 111ms
datatables parceljs
using Parcel and datatables.
Using the Datatables downloader, I have in my app.js
:
require( 'jszip' );
require( 'datatables.net-bs4' )();
require( 'datatables.net-buttons-bs4' )();
require( 'datatables.net-buttons/js/buttons.html5.js' )();
require( 'datatables.net-buttons/js/buttons.print.js' )();
require( 'datatables.net-keytable-bs4' )();
require( 'datatables.net-responsive-bs4' )();
require( 'datatables.net-select-bs4' )();
In my config:
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', // 'selected', 'selectAll', 'print'
],
Issue 1: buttons are not shown
I do see the filter field and table, but the buttons do not show.
Found multiple questions related to this one, but all refer to the need to have B
in dom
.
Issue 2: certain buttons give Uncaught Unknown button type
The Copy/CSV/Excel buttons don't give an error message, but other do: print
, selected
, selectAll
, etc.
These give (e.g.): Uncaught Unknown button type: selectAll
Many similar posts point towards the necessary files not being there.
In my case that seems to be ok:
$ ls -1 node_modules/datatables.net-buttons/js/
buttons.colVis.js
buttons.colVis.min.js
buttons.flash.js
buttons.flash.min.js
buttons.html5.js
buttons.html5.min.js
buttons.print.js
buttons.print.min.js
dataTables.buttons.js
dataTables.buttons.min.js
And from the Parcel log:
19:45 $ parcel build index.html --detailed-report --public-url ./dist --log-level 4 | grep datatable
[7:45:21 PM]: Built node_modules/datatables.net-buttons/js/buttons.print.js...
[7:45:22 PM]: Built node_modules/datatables.net-buttons/js/buttons.html5.js...
[7:45:22 PM]: Built node_modules/datatables.net-select/js/dataTables.select.js...
[7:45:22 PM]: Built node_modules/datatables.net-select-bs4/js/select.bootstrap4.js...
[7:45:22 PM]: Built node_modules/datatables.net-responsive/js/dataTables.responsive.js...
[7:45:22 PM]: Built node_modules/datatables.net-responsive-bs4/js/responsive.bootstrap4.js...
[7:45:22 PM]: Built node_modules/datatables.net-buttons/js/dataTables.buttons.js...
[7:45:22 PM]: Built node_modules/datatables.net-buttons-bs4/js/buttons.bootstrap4.js...
[7:45:22 PM]: Built node_modules/datatables.net/js/jquery.dataTables.js...
[7:45:22 PM]: Built node_modules/datatables.net-bs4/js/dataTables.bootstrap4.js...
[7:45:22 PM]: ├── node_modules/datatables.net/js/jquery.dataTables.js 80.8 KB 423ms
[7:45:22 PM]: ├── node_modules/datatables.net-buttons/js/buttons.html5.js 24.16 KB 111ms
datatables parceljs
datatables parceljs
asked Jan 2 at 19:13
wivkuwivku
793724
793724
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54011933%2fdatatables-parcel-button-excel-works-button-print-select-selected-uncaught%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54011933%2fdatatables-parcel-button-excel-works-button-print-select-selected-uncaught%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown