about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--gn2/wqflask/templates/gnqa_search_history.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/gn2/wqflask/templates/gnqa_search_history.html b/gn2/wqflask/templates/gnqa_search_history.html
index 2019cb3b..8d54ad80 100644
--- a/gn2/wqflask/templates/gnqa_search_history.html
+++ b/gn2/wqflask/templates/gnqa_search_history.html
@@ -54,7 +54,13 @@
 </section>
 <script>
   htmx.on("#delete-btn", "click", function(evt){
-      htmx.ajax("DELETE","/gnqna/records", {target: "#search-hist","swap" :"outerHTML",
+      htmx.ajax("DELETE","/gnqna/records", {target: "#search-hist", swap :"none",
+					    handler: (target,obj) =>{
+						htmx.ajax("GET", "gnqna/records", {
+						    target: "#search-hist",
+						    swap: "innerHTML"
+						})
+					    },
 				      values: Array.from(htmx.findAll("input[type=checkbox]:checked"), e => e.value)}) 
   })
 </script>