diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js index c20915fd60..a1a8d9be67 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -906,13 +906,17 @@ function _dt_add_filters(table_node, table_dt, filters_options = {}) { } } + var search = $.fn.dataTable.util.throttle( function ( i, val ) { + table_dt + .column( i ) + .search( val ) + .draw(); + }, 1000 ); + $( input_type, this ).on( 'keyup change', function () { if ( table_dt.column(i).search() !== this.value ) { if ( input_type == "input" ) { - table_dt - .column(i) - .search( this.value ) - .draw(); + search(i, this.value) } else { table_dt .column(i)