diff options
-rw-r--r-- | wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js | 12 |
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(); + } ); +} |