jQuery DataTables: hide search bar

后端 未结 4 1301
悲哀的现实
悲哀的现实 2021-02-14 13:33

I seem not able to hide DataTables default search bar. So far, I have tried solution from this thread, but setting bFilter:false disables filtering entirely, so my

4条回答
  •  一整个雨季
    2021-02-14 14:05

    Data table provides customization options to show and hide elements and also custom elements. We can use dom values to customize:

     l - length changing input control
        **f - filtering input**
        t - The table
        i - Table information summary
        p - pagination control
        r - processing display element
    
        **f is for filter , so we can remove it.**
    
            $('#example').dataTable( {
              "dom": 'lrtip'
            } );
    

提交回复
热议问题