我无法对dataTable的输入选择应用自定义过滤器。
当我单击按钮时,它不起作用 请帮助
$('#searchRule').click(function() {
var ruleSelected = $('#ruleSelected').val();
console.log('ruleSelected : ', ruleSelected);
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
console.log('data[0] : ', data[0]);
if (ruleSelected == data[0]) {
console.log('true');
return true;
} else {
console.log('false');
return false;
}
});
console.log('end search push');
tableListDetailOptim.draw();
console.log('end draw');
});