diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js
index dcfef3cf7a..58dc8567ea 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js
+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js
@@ -1058,12 +1058,14 @@ function _dt_add_filters(table_node, table_dt, filters_options = {}) {
filters_options[i] = filters_options[i](table_dt);
}
$(filters_options[i]).each(function () {
+ let optionValue =
+ table_dt.settings()[0].ajax !== null
+ ? `^${this._id}$`
+ : this._id;
let o = $(
- ''.format(
- this._id,
- this._str
- )
+ ``
);
+
// Compare with lc, or selfreg won't match ^SELFREG$ for instance, see bug 32517
// This is only for category, we might want to apply it only in this case.
existing_search = existing_search.toLowerCase();
@@ -1142,7 +1144,6 @@ function _dt_add_delay_filters(table_dt, table_node) {
.find("select")
.unbind()
.bind("keyup change", function () {
- let value = this.value.length ? "^" + this.value + "$" : "";
col_select_search(i, this.value);
});
});