aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2021-02-08 19:02:58 +0000
committerzsloan2021-02-08 19:02:58 +0000
commit9c0da5569970d38f0cb605f2a56df2976a7f0eda (patch)
treecdf8d97e6560bb9b87cd048ae2aa79fdf52fb943
parentb9323f1a0ac60c95b50d399ba6871b66178c410f (diff)
downloadgenenetwork2-9c0da5569970d38f0cb605f2a56df2976a7f0eda.tar.gz
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
-rw-r--r--wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js4
1 files changed, 4 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 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