From 9c0da5569970d38f0cb605f2a56df2976a7f0eda Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 8 Feb 2021 19:02:58 +0000 Subject: Called draw function on trait page tables in order to adjust their height on initial load if there aren't enough samples to fit the initial table height --- wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'wqflask') 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 4362a75e..4ccdf676 100644 --- a/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js +++ b/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js @@ -161,6 +161,8 @@ var primary_table = $('#samples_primary').DataTable( { 'scrollCollapse': true } ); +primary_table.draw(); //ZS: This makes the table adjust its height properly on initial load + primary_table.on( 'order.dt search.dt draw.dt', function () { primary_table.column(1, {search:'applied', order:'applied'}).nodes().each( function (cell, i) { cell.innerHTML = i+1; @@ -217,4 +219,6 @@ if (js_data.sample_lists.length > 1){ 'scroller': true, 'scrollCollapse': true } ); + + other_table.draw(); //ZS: This makes the table adjust its height properly on initial load } \ No newline at end of file -- cgit v1.2.3