Datatables search box is not showing

Dinesh picture Dinesh · Nov 29, 2018 · Viewed 9.4k times · Source

I am using Datatables and I found that the searchbox is not appearing near the table.

$(document).ready(function() {
                    $('#dfUsageTable').DataTable({
                        pageLength: 10,
                        filter: true
                        deferRender:    true,
                        scrollY:        200,
                        scrollCollapse: true,
                        scroller:       true
                    });
                } );

I have tried adding filter option , but still it is not working.

JSFiddle

Answer

Sumit Patel picture Sumit Patel · Nov 29, 2018

Please use the following code, you were missing ',' on the third line.

$('#dfUsageTable').DataTable({
    pageLength: 10,
    filter: true,
    deferRender: true,
    scrollY: 200,
    scrollCollapse: true,
    scroller: true
});