Why doesn't your Scroller sample show paging buttons?

Why doesn't your Scroller sample show paging buttons?

5baldwin5baldwin Posts: 1Questions: 1Answers: 0

I'm using datatables.net v1.12.1
datatables.net-scroller v2.0.7
Your Scroller example code is so simple but it doesn't render as shown on your page
Your example uses:

  $('#example').DataTable( {
        serverSide: true,
        ordering: false,
        searching: false,
        ajax: function ( data, callback, settings ) {
            var out = [];
 
            for ( var i=data.start, ien=data.start+data.length ; i<ien ; i++ ) {
                out.push( [ i+'-1', i+'-2', i+'-3', i+'-4', i+'-5' ] );
            }
 
            setTimeout( function () {
                callback( {
                    draw: data.draw,
                    data: out,
                    recordsTotal: 5000000,
                    recordsFiltered: 5000000
                } );
            }, 50 );
        },
        scrollY: 200,
        scroller: {
            loadingIndicator: true
        },
    } );

I've replicated that code in my application but my render includes the paging buttons -- I assume because paging is enabled by default -- so why doesn't your example show the paging buttons?

Answers

  • kthorngrenkthorngren Posts: 20,300Questions: 26Answers: 4,769

    Its not expected to see the paging buttons with the Scroller. Did you install the scroller.css? Inspecting any of the Scroller examples you will see that the scroller.css applies this CSS to hide the paging buttons:

    div.dts div.dataTables_paginate, div.dts div.dataTables_length {
        display: none;
    }
    

    Kevin

Sign In or Register to comment.