datatables 1.10 fnresetallfilters - undefined is not a function

datatables 1.10 fnresetallfilters - undefined is not a function

MuhaheMuhahe Posts: 25Questions: 8Answers: 2
edited August 2014 in Free community support

Hi, i upgraded datatables to 1.10 and after upgrade i cant use function fnResetAllFilters (for cyberhobos columnfilterwidget). Im getting error message undefined is not a function with marker for projectsTable.fnResetAllFilters(); (projects table is variable with stored datatables). On 1.9 everything worked like a charm. I would be happy for every hint

filter function

$.fn.dataTable.Api.fnResetAllFilters = function (oSettings, bDraw/*default true*/) {
        for(iCol = 0; iCol < oSettings.aoPreSearchCols.length; iCol++) {
            oSettings.aoPreSearchCols[ iCol ].sSearch = '';
        }
        $('.filter-term').remove();
        oSettings.oPreviousSearch.sSearch = '';
        if(typeof bDraw === 'undefined') bDraw = true;
        if(bDraw) this.fnDraw();
    }

Plus another issue is, when i use columnDefs and render to format html in cells, filters are disabled and only value is [Object object]

example of columnDefs

"columnDefs": [
           {   
               "targets":0,
               "render": function (data, type, row){
                   if(data.child == null){
                        return '<img class=addNewTaskDialogOpener data-id="p' + data.id + '" class="addButtonImg"  src=' + basePath + '/images/addButton.png ">';
                   }else{
                        return '<img class=addNewTaskDialogOpener data-id="p' + data.id + '" class="addButtonImg" src=' + basePath + '/images/addButton.png ">'+'<img id="p' + data.id + '" class="showHideImage" src=' + basePath + '/images/plus.png>';
                   }               
               }
           },

But if i use only columns it works well, but i cant figure out how to format html to cell

"columns":[
         {"data": "name", "type": "html"},
         {"data": "name"},
         {"data": null},
         {"data": null},
         {"data": null},
         {"data": null},
         {"data": null},
         {"data": null},
         {"data": null},
         {"data": null},
         {"data": null},
         {"data": null}
       ]
This discussion has been closed.