From 98d04dd71d99a6e65fee9b83afffc52e27b67e8c Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 23 Feb 2023 21:51:35 +0000 Subject: Uncheck/unselect rows when reseting trait page table For some reason DataTables was sorting checked rows to the bottom when redrawing the table with the Reset button, so this is the only solution I could come up with (since I don't know the actual reason it was doing that) --- wqflask/wqflask/static/new/javascript/show_trait.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js index 6d412ab0..a2a5c67d 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait.js +++ b/wqflask/wqflask/static/new/javascript/show_trait.js @@ -873,6 +873,10 @@ resetSamplesTable = function() { } }; $('.reset').click(function() { + $('.selected').each(function() { + $(this).removeClass('selected'); + $(this).find('.edit_sample_checkbox').prop("checked", false); + }) resetSamplesTable(); $('input[name="transform"]').val(""); editDataChange(); -- cgit v1.2.3