filter - yadcf cumulative filtering causing issues with multi_select -
i trying use cumulative_filtering yadcf filter plugin datatables. when turn on cumulative_filtering, multi_select boxes (both select , select2) 'see' data on current page of table. table has 17k records , using pagination. without cumulative filtering, both select types 'see' available values across entire dataset.
is known issue? there work around it?
var attachfilter = function(datatableobj) { datatableobj.yadcf([{ column_number: 1, filter_type: "multi_select", select_type: 'select2' }, { column_number: 2, filter_type: "multi_select", select_type: 'select' }, { column_number: 3, filter_type: "text" } ] ,{ cumulative_filtering: true} ); }; <snip> model.dtoptions = dtoptionsbuilder.fromfnpromise(function() { return skulistpromise.then( function(skuinfo){ //model.skuinfo = answer.data.data; return skuinfo.data.data; }, function(failreason){ alert("warning robinson"); } ); }).withpaginationtype('full_numbers') .withoption('bjqueryui', true) .withoption('bdeferrender', true) .withoption('bautowidth', false) //this called after datatable finishes loading .withoption('drawcallback', function(settings) { attachfilter($("#mpn_table").datatable()); //give attach filter few milliseconds , apply filters if exist settimeout(function() { if (model.onceperload && model.colnum && model.colnum !== -1) { model.applyfilter(model.colnum, model.filterstring); model.onceperload = false; } }, 50); //now bind events need track on table var thistable = settings.ntable.id; tablehelperservice.jqbind(skureturnservice, thistable); });
Comments
Post a Comment