Custom Scroller for Datatables - Perfect Scroller

Custom Scroller for Datatables - Perfect Scroller

poetawdpoetawd Posts: 12Questions: 1Answers: 0

Hello All !

Just want to share this with you all and ask you could help me test it !

I used the plugin Perfect Scrollbar with Datatables and the result was... INCREDIBLE !!!!

The result : https://ibb.co/mPNvyU

Here is the plugin page: https://github.com/utatti/perfect-scrollbar

Please test it and give feedback here ! Thank you !

Here is my table code:

```// begin first table
var grid = $('#gTable').DataTable({

    ajax: url,
    responsive: !0,
    deferRender: !0,
    scrollY: "500px",
    scrollCollapse: !0,
    scroller: !0,
    "fnInitComplete": function () {
        //$('.dataTables_scrollBody').perfectScrollbar();
        const ps = new PerfectScrollbar('.dataTables_scrollBody');
    },
       //on paginition page 2,3.. often scroll shown, so reset it and assign it again 
    "fnDrawCallback": function (oSettings) {
        //$('.dataTables_scrollBody').perfectScrollbar('destroy').perfectScrollbar();
        //ps.update();
        const ps = new PerfectScrollbar('.dataTables_scrollBody');
    }
});```
This discussion has been closed.