DataTable: Hide the Show Entries dropdown but keep the Search box

后端 未结 13 1464
再見小時候
再見小時候 2021-01-29 23:55

Is it possible to hide the Show Entries dropdown but keep the Search box in DataTable? I want to always display 10 rows with pagination at the bottom along with search box but d

13条回答
  •  感情败类
    2021-01-30 00:14

    For DataTables <=1.9, @perpo's answer

    $('#example').dataTable({
        "bLengthChange": false
    });
    

    works fine, but for 1.10+ try this:

    $('#example').dataTable({
        "dom": 'ftipr'
    }); 
    

    where we have left out l the "length changing input control"

    1.9 Docs

    1.10 Docs

提交回复
热议问题