How can I use Editor with Vue Cli 3 + TypeScript?

How can I use Editor with Vue Cli 3 + TypeScript?

"dependencies": {
"autoprefixer": "10.4.5",
"axios": "^1.6.5",
"bootstrap-vue": "^2.23.1",
"datatables.net-editor": "^2.2.2",
"datatables.net-select": "^1.7.0",
"datatables.net-buttons": "^2.3.6",
"datatables.net-vue3": "^2.1.3",
"jquery": "^3.7.1",
"material-icons": "^1.13.12",
"vue": "^3.2.13",
"vue-axios": "^3.5.2",
"vue-class-component": "^8.0.0-0",
"vue-loading-overlay": "^5.0.3",
"vue-router": "^4.0.3",
"vue-toast-notification": "^3.1.2",
"vue3-popper": "^1.5.0"
},

Answers

  • allanallan Posts: 61,744Questions: 1Answers: 10,111 Site admin

    Have you run the install.js script for datatables.net-editor to install the Editor files, as described in its readme?

    Beyond that, what have you tried and what errors are you getting? I'd expect you to be able to do:

    import DataTable from 'datatables.net-vue3';
    import DataTablesCore from 'datatables.net';
    import 'datatables.net-select';
    import 'datatables.net-buttons';
    import 'datatables.net-editor';
    
    DataTable.use(DataTablesCore);
    
    const editor = new DataTable.Editor( { ... } );
    

    Allan

Sign In or Register to comment.