Skip to content

Commit d894b51

Browse files
add a function to clear the search results on navigation
1 parent 237d7aa commit d894b51

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sde_indexing_helper/static/js/collection_list.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,9 @@ function postCurator(collection_id, curator_id) {
391391
$(document).ready(function () {
392392
setupClickHandlers();
393393

394+
// Clear search values and redraw table
395+
clearSearchValues();
396+
394397
// Remove the search input and add custom titles
395398
var paneTitles = [
396399
null,
@@ -424,3 +427,8 @@ function setupClickHandlers() {
424427
handleWorkflowStatusSelect();
425428
handleCuratorSelect();
426429
}
430+
431+
function clearSearchValues() {
432+
let table = $("#collection_table").DataTable();
433+
table.columns().search("").draw();
434+
}

0 commit comments

Comments
 (0)