From c5fff400ce842e93aca3584fb85f207088a62f77 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 29 Apr 2024 23:13:43 +0200 Subject: [PATCH] Bug 35138: Fix delete button for newly added facet --- koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js b/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js index 23cabf0bb61..bd01ad58ea3 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js +++ b/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js @@ -177,7 +177,7 @@ $(document).ready(function () { if (search_field_name.length > 0) { const next_id = Math.max.apply(null, dt_data.map(row => row[0])) + 1; const label = selected_option.data('label'); - new_line = [next_id, search_field_name, '%s'.format(label.escapeHtml(), search_field_name.escapeHtml()), build_delete_link()] + new_line = [next_id, search_field_name, '%s'.format(label.escapeHtml(), search_field_name.escapeHtml()), build_delete_link('delete-facet')] dt.row.add(new_line).draw(); clean_line(line); -- 2.34.1