Bug 37334: Allow a column filter to be shown even searchable is off

We do not want to use the usual filtering method here, we are building
the query from "additional filters"

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2024-10-02 14:50:54 +02:00 committed by Katrin Fischer
parent c6043c1169
commit e8129f5aea
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 4 additions and 3 deletions

View File

@ -1029,12 +1029,13 @@ function _dt_add_filters(table_node, table_dt, filters_options = {}) {
let th = $(table_node).find(
"thead tr:eq(1) th:eq(%s)".format(visible_i)
);
var is_searchable = columns[i].bSearchable;
$(th)
var is_searchable = table_dt.settings()[0].aoColumns[i].bSearchable;
$(this)
.removeClass("sorting")
.removeClass("sorting_asc")
.removeClass("sorting_desc");
if (is_searchable) {
$(this).data("th-id", i);
if (is_searchable || $(this).data("filter") || filters_options[i]) {
let input_type = "input";
let existing_search = column.search();
if ($(th).data("filter") || filters_options.hasOwnProperty(i)) {