Server side pagination not displaying next previous button

571 Views Asked by At

I have created a server side pagination datatable, but when created it shows only the limited records(10 records) on the first load of datatable. After the initial load there is only one button shown as 1. there is no previous or next button and there is no buttons like 2,3,4,etc. My client side code is:

var dataTable = $('#inner_table').DataTable({
        'processing': true,
        'serverSide': true,
        'serverMethod': 'get',
        'paging' :true,
        'pagingType':"simple_numbers",
        'lengthChange': false,
        'searching': false,
        'ajax': {
            'url': '{{ route("inner_search") }}',
            'data': function(data) {
                // // Append to data
                data.searchBycode = $('#searchBycodes').val();
                data.searchBydescription = $('#searchBydescription').val();
            }
        },
        'columns': [{
                data: 'formatted_dx_code'
            },
            {
                data: 'short_desc'
            }
        ],
        "fnDrawCallback": function(oSettings) {
                console.log(oSettings);
                
             if ($(this).find('tbody tr').length <= 15) {
                 
             }
        },

});

The screenshot of the datatable is not showing other pagination butto in my page is :

Bottom of the datatable created

Am I missing anything?

0

There are 0 best solutions below