aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2021-02-02 15:33:14 -0600
committerzsloan2021-02-02 15:33:14 -0600
commit9d2887e6b9ff94d85caa5a696a97fc38944655c8 (patch)
treed885ac05290de57ba32624baa83717ee4bedb49f
parent1f3d1c62b5317f5c98cbb1ff3556e3e6b8c239e2 (diff)
downloadgenenetwork2-9d2887e6b9ff94d85caa5a696a97fc38944655c8.tar.gz
Disabled Scroller for search results when there are fewer than 20 results (in order to avoid strange behavior when there are only a handful of rows)
-rw-r--r--wqflask/wqflask/templates/search_result_page.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html
index 2dde5727..1a034741 100644
--- a/wqflask/wqflask/templates/search_result_page.html
+++ b/wqflask/wqflask/templates/search_result_page.html
@@ -386,11 +386,13 @@
'sDom': "iti",
"autoWidth": true,
"bSortClasses": false,
+ {% if trait_list|length > 20 %}
"scrollY": "100vh",
"scroller": true,
"scrollCollapse": true
+ {% endif %}
} );
-
+
trait_table.draw(); //ZS: This makes the table adjust its height properly on initial load
$('.toggle-vis').on( 'click', function (e) {