aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2023-01-09 20:57:30 +0000
committerzsloan2023-01-09 20:57:30 +0000
commit29abefa0f5cf9bc8dc86d614bb86644aee4bf740 (patch)
treee25f5cd29dc182199f3277d48cc75939f18dfd42 /wqflask
parentb38f4dc1d7a7590a66e327b22c0e3e69d407ffdc (diff)
downloadgenenetwork2-29abefa0f5cf9bc8dc86d614bb86644aee4bf740.tar.gz
Add back option to search on trait page table
This was mistakenly removed when the table code was refactored a while back
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js b/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js
index cfc4f39e..9b9ed68b 100644
--- a/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js
+++ b/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js
@@ -223,3 +223,15 @@ for (var i = 0; i < tableIds.length; i++) {
create_table(tableId, js_data['sample_lists'][i], columnDefs, tableSettings);
}
+
+primary_table = $('#samples_primary').DataTable();
+$('#primary_searchbox').on( 'keyup', function () {
+ primary_table.search($(this).val()).draw();
+} );
+
+if ($('#samples_other').length) {
+ other_table = $('#samples_other').DataTable();
+ $('#other_searchbox').on( 'keyup', function () {
+ other_table.search($(this).val()).draw();
+ } );
+}