error, table.buttons() is not a function

error, table.buttons() is not a function

DWE64DWE64 Posts: 1Questions: 1Answers: 0
//Buttons examples
let table = $('#datatable-buttons').DataTable({
    lengthChange: false,
    buttons: ['copy', 'print'],
    "language": {
        "paginate": {
            "previous": "<i class='mdi mdi-chevron-left'>",
            "next": "<i class='mdi mdi-chevron-right'>"
        }
    },
    "drawCallback": function () {
        $('.dataTables_paginate > .pagination').addClass('pagination-rounded');
    }
});

// Multi Selection Datatable
$('#selection-datatable').DataTable({
    select: {
        style: 'multi'
    },
    "language": {
        "paginate": {
            "previous": "<i class='mdi mdi-chevron-left'>",
            "next": "<i class='mdi mdi-chevron-right'>"
        }
    },
    "drawCallback": function () {
        $('.dataTables_paginate > .pagination').addClass('pagination-rounded');
    }
});

table.buttons().container()
        .appendTo('#datatable-buttons_wrapper .col-md-6:eq(0)');

I'm not realized updating since 1 month. in september the function was recognized and now not. Why ???
Please help me to fix this bug.
Thanks you!

Answers

Sign In or Register to comment.