Disabling smart search does not actually disable it

Disabling smart search does not actually disable it

anujeetanujeet Posts: 39Questions: 15Answers: 0
edited January 2016 in Free community support

This is my code.Please tell me where I am doing wrong to disable datatable smart search

var table = $('#jq-datatables').DataTable({
        "ajax": url,
        "type": "POST",   
        //"serverSide": true,
        "processing": true,
        "aoColumns": dataArr,
        "iDisplayLength": parseInt($('#rowsLimit').html()),
        columnDefs: [
            {
                targets: targetArr,
                visible: false
            },
            { 
                type: 'date-sort', 
                targets: [11,12,17,18] 
            },
            {
                targets: 8 ,
                className: 'disableRowClick'
            }
        ],
        "search": [{ 
            "smart": false,
        }],
        "deferRender": true,
        "scrollX": true,
        "iDisplayLength": parseInt($('#rowsLimit').html()),
        "order": [[ 1, "desc" ]],
        "oLanguage": {
            "sLengthMenu":   $('#perPage').html()+":   _MENU_",
            "sInfo":         $('#showing').html()+" _START_ "+$('#to').html()+" _END_ "+$('#of').html()+" _TOTAL_ "+$('#entries').html(),
            "sInfoEmpty":    $('#showing').html()+" 0 "+$('#to').html()+" 0 "+$('#of').html()+" 0 "+$('#entries').html(),
            "sZeroRecords":  $('#noDataAvailable').html(),
            "oPaginate": {
                "sPrevious": $('#previous').html(),
                "sNext":     $('#next').html(),
            }
        }
    }); 


$('#jq-datatables_filter input').keypress(function(e) {
        if (e.which == 13) {
            table.search({
                input: this.value,
            }).draw();
        }
    });

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Answer ✓

    Per the forum rules, please link to a test case showing the issue. Also the search option should not be an array.

    Allan

This discussion has been closed.