How to disable searching in specific DataTable columns?

后端 未结 4 666
面向向阳花
面向向阳花 2021-01-20 16:13

I\'m using successfully this code

function refreshDataTable() {
        // The table is made sortable
        $(\'#order_proposal_table\').DataTable({
              


        
4条回答
  •  孤城傲影
    2021-01-20 16:32

    Have you tried passing null for the remaining 4 columns rather than just specifying the first 5? So:

    'columns': [
                { 'searchable': false },
                { 'searchable': false },
                null,   
                null,
                { 'searchable': false },
                null,   
                null,   
                null,   
                null
            ]
    

    I would have posted this as a comment but I couldn't include the example.

提交回复
热议问题