From 04f29d1d77caf76ea30342b91ae3eb54e265667b Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Fri, 24 Feb 2023 15:47:41 +0100
Subject: [PATCH] Bug 33066: Fix dt - no need to reselect

---
 koha-tmpl/intranet-tmpl/prog/js/datatables.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js
index 81a900e0841..94ff597ff83 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js
+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js
@@ -58,7 +58,7 @@ var dataTablesDefaults = {
         // When the DataTables search function is triggered,
         // enable or disable the "Clear filter" button based on
         // the presence of a search string
-        $("#" + tableId ).on( 'search.dt', function ( e, settings ) {
+        this.on( 'search.dt', function ( e, settings ) {
             toggledClearFilter(settings.oPreviousSearch.sSearch, tableId);
         });
     }
-- 
2.25.1