1
我找到了一个过滤器配置以过滤空列。 问题是我只知道如何将其应用于一列(在示例列号8中)。我想将其同时应用于其他列(例如第8,12和17列)。 谢谢!Tablesorter将过滤器设置设置为多列
filter_functions: {
8: {
'{empty}' : function (e, n, f, i, $r, c) {
return $.trim(e) === '';
}
}
},
filter_selectSource: {
8: function (table, column, onlyAvail) {
// get an array of all table cell contents for a table column
var array = $.tablesorter.filter.getOptions(table, column, onlyAvail);
// manipulate the array as desired, then return it
array.push('{empty}');
return array;
}
},
谢谢先生Mottie !!我还发现,如果在常规过滤器中点击:“”您也只会过滤空单元格。 –
对不起,点击什么? – Mottie
只需打开并关闭像这样的双引号 - >“” –