Lines 982-993
function _dt_add_filters(table_node, table_dt, filters_options = {}) {
Link Here
|
982 |
let th = $(table_node).find( |
982 |
let th = $(table_node).find( |
983 |
"thead tr:eq(1) th:eq(%s)".format(visible_i) |
983 |
"thead tr:eq(1) th:eq(%s)".format(visible_i) |
984 |
); |
984 |
); |
985 |
var is_searchable = columns[i].bSearchable; |
985 |
var is_searchable = table_dt.settings()[0].aoColumns[i].bSearchable; |
986 |
$(th) |
986 |
$(this) |
987 |
.removeClass("sorting") |
987 |
.removeClass("sorting") |
988 |
.removeClass("sorting_asc") |
988 |
.removeClass("sorting_asc") |
989 |
.removeClass("sorting_desc"); |
989 |
.removeClass("sorting_desc"); |
990 |
if (is_searchable) { |
990 |
$(this).data("th-id", i); |
|
|
991 |
if (is_searchable || $(this).data("filter") || filters_options[i]) { |
991 |
let input_type = "input"; |
992 |
let input_type = "input"; |
992 |
let existing_search = column.search(); |
993 |
let existing_search = column.search(); |
993 |
if ($(th).data("filter") || filters_options.hasOwnProperty(i)) { |
994 |
if ($(th).data("filter") || filters_options.hasOwnProperty(i)) { |
994 |
- |
|
|